TGComboBox


class description - source file - inheritance tree

class TGComboBox : public TGCompositeFrame


    public:
TGComboBox TGComboBox(TGWindow* p, Int_t id, UInt_t options = kHorizontalFrame|kSunkenFrame|kDoubleBorder, ULong_t back = fgWhitePixel) TGComboBox TGComboBox(TGComboBox&) virtual void ~TGComboBox() virtual void AddEntry(TGString* s, Int_t id) virtual void AddEntry(char* s, Int_t id) virtual void AddEntry(TGLBEntry* lbe, TGLayoutHints* lhints) virtual void Associate(TGWindow* w) TClass* Class() virtual void DrawBorder() virtual TGDimension GetDefaultSize() virtual const TGListBox* GetListBox() virtual Int_t GetSelected() virtual TGLBEntry* GetSelectedEntry() virtual Bool_t HandleButton(Event_t* event) virtual void InsertEntry(TGString* s, Int_t id, Int_t afterID) virtual void InsertEntry(char* s, Int_t id, Int_t afterID) virtual void InsertEntry(TGLBEntry* lbe, TGLayoutHints* lhints, Int_t afterID) virtual TClass* IsA() virtual Bool_t ProcessMessage(Long_t msg, Long_t parm1, Long_t parm2) virtual void RemoveEntries(Int_t from_ID, Int_t to_ID) virtual void RemoveEntry(Int_t id) virtual void Select(Int_t id) virtual void SetTopEntry(TGLBEntry* e, TGLayoutHints* lh) virtual void ShowMembers(TMemberInspector& insp, char* parent) virtual void Streamer(TBuffer& b)

Data Members

protected:
Int_t fComboBoxId combobox widget id TGLBEntry* fSelEntry selected item frame TGScrollBarElement* fDDButton button controlling drop down of popup TGComboBoxPopup* fComboFrame popup containing a listbox TGListBox* fListBox the listbox with text items static const TGPicture* fBpic down arrow picture used in fDDButton static const TGWindow* fMsgWindow window handling combobox messages TGLayoutHints* fLhs layout hints for selected item frame TGLayoutHints* fLhb layout hints for fDDButton TGLayoutHints* fLhdd layout hints for fListBox

Class Description

                                                                      
 TGComboBox, TGComboBoxPopup                                          
                                                                      
 A combobox (also known as a drop down listbox) allows the selection  
 of one item out of a list of items. The selected item is visible in  
 a little window. To view the list of possible items one has to click 
 on a button on the right of the little window. This will drop down   
 a listbox. After selecting an item from the listbox the box will     
 disappear and the newly selected item will be shown in the little    
 window.                                                              
                                                                      
 The TGComboBox is user callable. The TGComboBoxPopup is a service    
 class of the combobox.                                               
                                                                      
 Selecting an item in the combobox will generate the event:           
 kC_COMMAND, kCM_COMBOBOX, combobox id, item id.                      
                                                                      


TGComboBox(const TGWindow *p, Int_t id, UInt_t options, ULong_t back) : TGCompositeFrame (p, 10, 10, options, back)
 Create a combo box widget.

~TGComboBox()
 Delete a combo box widget.

void DrawBorder()
 Draw border of combo box widget.

void SetTopEntry(TGLBEntry *e, TGLayoutHints *lh)
 Set a new combo box value (normally update of text string in
 fSelEntry is done via fSelEntry::Update()).

void Select(Int_t id)
 Make the selected item visible in the combo box window.

Bool_t HandleButton(Event_t *event)
 Handle mouse button events in the combo box.

Bool_t ProcessMessage(Long_t msg, Long_t, Long_t parm2)
 Process messages generated by the listbox and forward
 messages to the combobox message handling window. Parm2 contains
 the id of the selected listbox entry.



Inline Functions


             TGDimension GetDefaultSize()
                    void Associate(TGWindow* w)
                    void AddEntry(TGString* s, Int_t id)
                    void AddEntry(char* s, Int_t id)
                    void AddEntry(TGLBEntry* lbe, TGLayoutHints* lhints)
                    void InsertEntry(TGString* s, Int_t id, Int_t afterID)
                    void InsertEntry(char* s, Int_t id, Int_t afterID)
                    void InsertEntry(TGLBEntry* lbe, TGLayoutHints* lhints, Int_t afterID)
                    void RemoveEntry(Int_t id)
                    void RemoveEntries(Int_t from_ID, Int_t to_ID)
        const TGListBox* GetListBox()
                   Int_t GetSelected()
              TGLBEntry* GetSelectedEntry()
                 TClass* Class()
                 TClass* IsA()
                    void ShowMembers(TMemberInspector& insp, char* parent)
                    void Streamer(TBuffer& b)
              TGComboBox TGComboBox(TGComboBox&)


Author: Fons Rademakers 13/01/98
Last update: 2.00/00 18/02/98 18.49.46 by Fons Rademakers
Copyright (c) 1995-1999, The ROOT System, All rights reserved. *


ROOT page - Class index - Top of the page

This page has been automatically generated. If you have any comments or suggestions about the page layout send a mail to ROOT support, or contact the developers with any questions or problems regarding ROOT.