void table_layout() { TGMainFrame *main = new TGMainFrame(gClient->GetRoot(), 220, 220); TGVerticalFrame *pVF = new TGVerticalFrame(main, 200, 200); pVF->SetLayoutManager(new TGTableLayout(pVF, 5, 2, kFALSE, 5)); // TubeID Labels and Field. m_pLBL_TubeID = new TGLabel(pVF, "Tube ID"); m_pDlgTubeID = new TGTextEntry(pVF, ""); m_pDlgTubeID->SetToolTipText("Tube ID for the Animal Code and specimen."); pVF->AddFrame(m_pLBL_TubeID, new TGTableLayoutHints(0, 1, 0, 1, kLHintsLeft | kLHintsCenterY, 3, 3, 3, 3)); pVF->AddFrame(m_pDlgTubeID, new TGTableLayoutHints(1, 2, 0, 1, kLHintsLeft | kLHintsCenterY, 3, 3, 3, 3)); // Animal Code Field. m_pLBL_AnimalCode = new TGLabel(pVF, "Animal Code"); m_pDialogData = new TGTextEntry(pVF, ""); m_pDialogData->SetToolTipText("Animal Code specimen to be sorted."); pVF->AddFrame(m_pLBL_AnimalCode, new TGTableLayoutHints(0, 1, 1, 2, kLHintsLeft | kLHintsCenterY, 3, 3, 3, 3)); pVF->AddFrame(m_pDialogData, new TGTableLayoutHints(1, 2, 1, 2, kLHintsLeft | kLHintsCenterY, 3, 3, 3, 3)); /* m_pDialogData->SetFont(ft_l); m_pDialogData->SetText(""); m_pDialogData->SetEditable(kFALSE); m_pDialogData->SetEnabled(kTRUE); m_pDialogData->SetWindowName("Bull Data"); main->EnableBullDialog(kFALSE); // hide by default */ // SortType Field (ListBox) m_pLBL_SortType = new TGLabel(pVF, "Sort Type"); m_pDlgTubeIDSortType = new TGComboBox(pVF,90); m_pDlgTubeIDSortType->Resize(100, 20); m_pDlgTubeIDSortType->AddEntry("N/A", 0); m_pDlgTubeIDSortType->AddEntry("HE", 1); m_pDlgTubeIDSortType->AddEntry("HP", 2); m_pDlgTubeIDSortType->AddEntry("VHP", 3); m_pDlgTubeIDSortType->AddEntry("RES", 4); m_pDlgTubeIDSortType->Select(0); // Select N/A pVF->AddFrame(m_pLBL_SortType, new TGTableLayoutHints(0, 1, 2, 3, kLHintsLeft | kLHintsCenterY, 3, 3, 3, 3)); pVF->AddFrame(m_pDlgTubeIDSortType, new TGTableLayoutHints(1, 2, 2, 3, kLHintsLeft | kLHintsCenterY, 3, 3, 3, 3)); // Purity field. m_pLBL_Purity = new TGLabel(pVF, "Purity"); m_pDlgTubeIDPurity = new TGTextEntry(pVF, ""); m_pDlgTubeIDPurity->SetToolTipText("Purity of the Animal Code/specimen."); pVF->AddFrame(m_pLBL_Purity, new TGTableLayoutHints(0, 1, 3, 4, kLHintsLeft | kLHintsCenterY, 3, 3, 3, 3)); pVF->AddFrame(m_pDlgTubeIDPurity, new TGTableLayoutHints(1, 2, 3, 4, kLHintsLeft | kLHintsCenterY, 3, 3, 3, 3)); // MachineID Mismatch field (0 fail,1 success) m_pLBL_MachineID = new TGLabel(pVF, "Machine ID\nMatch"); m_pDlgTubeIDMachineIDMatch = new TGTextEntry(pVF, ""); m_pDlgTubeIDMachineIDMatch->SetToolTipText("Machine ID specifies if the Animal Code specimen is allowed to be sorted on this machine."); pVF->AddFrame(m_pLBL_MachineID, new TGTableLayoutHints(0, 1, 4, 5, kLHintsLeft | kLHintsCenterY, 3, 3, 3, 3)); pVF->AddFrame(m_pDlgTubeIDMachineIDMatch, new TGTableLayoutHints(1, 2, 4, 5, kLHintsLeft | kLHintsCenterY, 3, 3, 3, 3)); main->AddFrame(pVF, new TGLayoutHints(kLHintsCenterX|kLHintsCenterY, 0, 0, 10, 10)); main->MapSubwindows(); main->Layout(); main->Resize(main->GetDefaultSize()); main->MapWindow(); }