SourceForge.net wxNotebook

wxNotebook

wxNotebook
This class represents a notebook control, which manages multiple windows with associated tabs.

To use the class, create a wxNotebook object and call add_page, passing a window to be used as the page.

Creation Parameters
Note that sometimes you can reduce flicker by passing the wxCLIP_CHILDREN window style.
Functions/Procedures
Supertopics

wxNotebook

[proc]
add_page
( atom book, atom page, sequence text, integer select, atom image )

Category: wxNotebook

Adds the wxWindow page to the notebook, with text on the its tab. select indicates whether the page should be selected, and image is the image index into an imagelist.


wxNotebook

[proc]
delete_all_pages
( atom book )

Category: wxNotebook

This deletes all pages in a wxNotebook.


wxNotebook

[func]
get_current_page
( atom book )

Category: wxNotebook

This returns the current selected page of a wxNotebook. The index is 0 based, so the first page will be 0, instead of 1.


wxNotebook

[func]
get_next_page
( atom book, integer show )

Category: wxNotebook

This returns the next page in the book if show is 1, or shows the previous page if show is 0. If previous is chosen on the first page, the last page will be returned, and vice versa. Also, keep in mind of the wxNotebook's 0-based index.


wxNotebook

[func]
get_page_count
( atom book )

Category: wxNotebook

This returns the number of pages in a wxNotebook.


wxNotebook

[proc]
get_page_image
( atom book, integer page )

Category: wxNotebook

This returns the number of the sequence that the page gets it's image from if an imagelist is set. If it gets the image from the second pointer in a sequence, it will return a 1. Keep in mind that the wxNotebook works from a 0-based index as well.


wxNotebook

[proc]
insert_page
( integer position, atom book, atom page, sequence text, integer select, atom image )

Category: wxNotebook

Sets the selected page to the wxNotebook at a certain position, rather than adding it to the end. The sequence text will appear on it's tab, select can be 1 to make the wxNotebook focus on the selected page or 0 to continue working with the same page. Image will be a pointer to an image if an imagelist exists, or 0 for no image. This works with a 0-based index, so position should be 0 instead of 1 for the first page.


wxNotebook

[proc]
notebook_imagelist
( atom book, atom ilist )

Category: wxNotebook

This sets the wxImagelist to the wxNotebook, allowing the wxNotebook's children to use it's icons.


wxNotebook

[proc]
remove_page
( atom book, integer page )

Category: wxNotebook

Removes the selected page from the wxNotebook. The index is 0 based, so the first page will be 0, instead of 1.


wxNotebook

[proc]
set_padding
( atom book, sequence size )

Category: wxNotebook

Sequence is divided into X and Y amounts. X is the amount to add to to the wideness of the wxNotebook's tab's and Y is the amount that the text on the tabs will move down. If the values are negative, then X will subtract from the wideness of the tabs, and Y will make the text move up.


wxNotebook

[proc]
set_page_image
( atom book, integer page, atom image )

Category: wxNotebook

This sets the selected page to have the selected image, so long as an imagelist has been set.


wxNotebook

[proc]
set_page_selection
( atom book, integer page )

Category: wxNotebook

This sets the wxNotebook to show the specified page. The index is 0 based, so the first page will be 0, instead of 1.


wxNotebook

[proc]
set_page_text
( atom book, integer page, sequence text )

Category: wxNotebook

Sets the text of the wxNotebook's tab for that page to text. The first page is 0, not 1.


wxNotebook

[proc]
set_tab_size
( atom book, sequence size )

Category: wxNotebook

This works much like set_padding. However instead of increasing or decreasing the size, the tabs are set to have the width specified by the first value in size, and the length of the second value in size. However, unlike set_padding, a negative value is not to be used.


wxNotebook

[proc]
show_page
( atom book, integer page )

Category: wxNotebook

Sets the wxNotebook to show a page specified by integer page. The first page is 1 instead of being 0.