mw->SetTopWindow(win);
CPTabbedWindow
Class Name Derived From Styles Signals
CPTabbedWindow CPWindow FF_NONE PSF_SIZED
PSF_FOCUS_RECEIVED
PSF_FOCUS_LOST
PSF_KEY_RECEIVED
A CPTabbedWindow allows a virtual toolbar that is longer than the physical toolbar.
This is helpful when your user interface controls will not all fit on the standard toolbar.
The CPTabbedWindow has two panes each of which can contain PEG controls, such as
buttons, text entry fields, etc. It also has an arrow button that lets the user tab between
panes.
The following is an example of creating a tabbed window in an object’s AddUI()
function:
void YourModule::AddUI()
{
CPTabbedWindow* tui = (CPTabbedWindow*) m_ui;
CPWindow* pane0 = tui->GetFirstPane();
CPWindow* pane1 = tui->GetSecondPane();
PegRect rr = {1,1,70,15};
PegEditBox *m_eb = new PegEditBox(rr,0,FF_THIN | EF_EDIT, NULL,30);
pane0-> AddToolbarButton (m_eb);
PegTextButton* b = new PegTextButton(71,1, "Click Me",
CLICKME_ID,AF_ENABLED|TT_COPY);
pane0-> AddToolbarButton (b);
b = new PegTextButton(1,1, "Button1",
BUTTON1_ID,AF_ENABLED|TT_COPY);
pane1-> AddToolbarButton (b);
b = new PegTextButton(40,1, "Button2", BUTTON2_ID,
AF_ENABLED|TT_COPY);
pane1-> AddToolbarButton (b);
}
The result of this code is:
47