back to gui 

wxBookCtrlBase

generated from ../src/mod_gui/control/bookbase.cpp

Prototype for all book controls like wxNotebookCtrl, wxChoiceBookCtrlBase.

Constants

Styles

Name Description
DEFAULT
TOP
BOTTOM
LEFT
RIGHT
ALIGN_MASK

wxBookHittest

Name Description
NOWHERE There was no tab under this point.
ONICON The point was over an icon (currently wxMSW only).
ONLABEL The point was over a label (currently wxMSW only).
ONITEM The point was over an item, but not on the label or icon.
ONPAGE The point was over a currently selected page, not over any tab. Note that this flag is present only if -1 is returned.

wxBookHittest is ported as a separate class.

Properties

Name Type Description
controlMargin Integer Get/Set the margin around the controller.
controlSizer read only wxSizer Get the sizer containing the control.
currentPage read only wxWindow The current page.
fitToCurrentPage Boolean Get/Set option to shrink to fit current page.
imagelist wxImageList Get/Set the associated image list.
internalBorder Integer Get/Set size of area between book control area and page area.
pageCount read only Integer Returns the number of pages in the control.
selection Integer Get/Set the selected page.
vertical read only Boolean Returns true if we have wxBookCtrlBase.TOP or wxBookCtrlBase.BOTTOM style

Methods

addPage

addPage(Win, 
        Caption, 
        Select = false, 
        ImageId = -1) : Boolean
 
Name Type Default Description
Win wxWindow
Caption String
Select Boolean false
ImageId Integer -1

Add a new page.

advanceSelection

advanceSelection(Forward = true)
 
Name Type Default Description
Forward Boolean true

Sets the selection to the next or previous page.

changeSelection

changeSelection(Page) : Integer
 
Name Type Default Description
Page Integer The index of the page

Set Selection but does not generate events.

deleteAllPages

deleteAllPages() : Boolean
 

Delete all pages.

deletePage

deletePage(Page) : Boolean
 
Name Type Default Description
Page Integer The index of the page

Deletes a page at the given index. Calling this method will generate a page change event.

getPage

getPage(Index) : wxWindow
 
Name Type Default Description
Index Integer

Returns the page specified by the given index.

getPageImage

getPageImage(Index) : Integer
 
Name Type Default Description
Index Integer

Returns the item's image index in the current image list.

getPageText

getPageText(Index) : String
 
Name Type Default Description
Index Integer

Returns the tab label for the page.

hitTest

hitTest(Pos) : Array
 
Name Type Default Description
Pos wxPoint The position to test.

Returns an array with two elements: the page which is hit and a flag where it is it(icon, label).

insertPage

insertPage(Index, 
           Win, 
           Caption, 
           Select = false, 
           Image = -1) : Boolean
 
Name Type Default Description
Index Integer
Win wxWindow
Caption String
Select Boolean false
Image Integer -1

insertPage is similar to addPage, but allows the ability to specify the insert location. If the Select parameter is true, calling this will generate a page change event.

removePage

removePage(Page) : Boolean
 
Name Type Default Description
Page Integer The index of the page

Removes a page at the given index.

setPageImage

setPageImage(Page, 
             ImageId) : Boolean
 
Name Type Default Description
Page Integer The index of the page
ImageId Integer

Sets the item's image index in the current image list.

setPageSize

setPageSize(Size)
 
Name Type Default Description
Size wxSize

Resize the notebook so that all pages will have the specified size

setPageText

setPageText(Page, 
            Text) : Boolean
 
Name Type Default Description
Page Integer The index of the page
Text String

Sets the tab label.




Design downloaded from Zeroweb.org: Free website templates, layouts, and tools.