_ROOT Version:28.00b
_Platform:WIn 7
_Compiler:VS2008
Very frustrated with Root and poor documentation!
I have multiple TGLabels followed by TGTextEntries. The TGLabel lables don’t display well. I have to add a bunch of spaces to get the label to display. For example, if I use the following, “Tube ID” gets truncated to “Tube”.
m_pLBL_TubeID = new TGLabel(m_pOptionalDlgFrame, "Tube ID");
I have to use the following to display the ID portion.
m_pLBL_TubeID = new TGLabel(m_pOptionalDlgFrame, "Tube ID ");
Here is my code:
TGVerticalFrame *pVF = new TGVerticalFrame(this, 200,200);
m_pOptionalDlgFrame = new TGHorizontalFrame(pVF, 40,10);
// TubeID Labels and Field.
m_pLBL_TubeID = new TGLabel(m_pOptionalDlgFrame, "Tube ID");
m_pDlgTubeID = new TGTextEntry(m_pOptionalDlgFrame, "");
m_pOptionalDlgFrame->AddFrame(m_pLBL_TubeID, new TGLayoutHints(kLHintsCenterY | kLHintsExpandX, 0, 5, 0, 0));
m_pOptionalDlgFrame->AddFrame(m_pDlgTubeID, new TGLayoutHints(kLHintsLeft | kLHintsTop, 5, 5, 10, 0));
pVF->AddFrame(m_pOptionalDlgFrame, new TGLayoutHints(kLHintsNormal, 0, 0, 0, 0));
// Animal Code Field.
TGHorizontalFrame *m_pOptionalDlgFrame1 = new TGHorizontalFrame(pVF, 20,10);
m_pLBL_AnimalCode = new TGLabel(m_pOptionalDlgFrame1, "Animal Code ");
m_pDialogData = new TGTextEntry(m_pOptionalDlgFrame1, "");
m_pOptionalDlgFrame1->AddFrame(m_pLBL_AnimalCode, new TGLayoutHints(kLHintsNormal| kLHintsExpandX, 0, 0, 10, 0));
m_pOptionalDlgFrame1->AddFrame(m_pDialogData, new TGLayoutHints(kLHintsLeft | kLHintsTop, 5, 5, 10, 0));
pVF->AddFrame(m_pOptionalDlgFrame1, new TGLayoutHints(kLHintsLeft | kLHintsTop, 5, 5, 10, 0));
I’ve tried messing around with the TGLayoutHints, but not working without padding with a bunch of " " which I think is really poor solution.
What am I doing wrong?
Thank you,
Angel