wxChoicebook problem Topic is solved

If you are using the main C++ distribution of wxWidgets, Feel free to ask any question related to wxWidgets development here. This means questions regarding to C++ and wxWidgets, not compile problems.
Post Reply
MuhammadSohail
Experienced Solver
Experienced Solver
Posts: 96
Joined: Fri Jun 17, 2005 1:53 pm
Location: Germany
Contact:

wxChoicebook problem

Post by MuhammadSohail » Thu Mar 02, 2006 1:07 pm

Does any one give me an idea how to implement wxChoicebook

My application is divided into two section
Left side is wxTree Ctrl
Right side wxPanel

Tree control conatins panel id which shows one wxCombobox and wxChoicebook on Click event. This i have done by making class inherited from wxPanel . the constructor of the class initialize wxCombobox and wxChoicebook.

Till now no problem...
Now i want to add one more Id in the tree control which facilitate the user to append new panel id in the tree control and this new id should create empty wxCombobox and wxChoicebook in order that user can input their own values in the wxComboBox and wxChoicebook.
How can i create empty wxCombobox and wxChoicebook by calling the same panel class.

How can user append their own value in wxChoicebookk and wxCombobox?????

Any hint???????????

User avatar
ABX
Can't get richer than this
Can't get richer than this
Posts: 810
Joined: Mon Sep 06, 2004 1:43 pm
Location: Poznan, Poland
Contact:

Re: wxChoicebook problem

Post by ABX » Thu Mar 02, 2006 3:54 pm

Muhammad Sohail wrote:Does any one give me an idea how to implement wxChoicebook
wxChoicebook has exactly the same interface like wxNotebook. See wxWidgets/samples/notebook sample where wxChoicebook is presented.
Muhammad Sohail wrote:How can user append their own value in wxChoicebookk and wxCombobox?????
You can't append value to wxChoicebook because wxChoicebook is not cotainer for values. It's container of pages and switching between pages happens through selecting name of the page in wxChoice controller.

ABX
CVS Head, 2.8.X
wxMSW, wxWinCE, wxPalmOS, wxOS2, wxMGL, bakefile
gcc 3.2.3, bcc 5.51, dmc 8.48, ow 1.6, vc 7.1, evc 3/4, pods 1.2

MuhammadSohail
Experienced Solver
Experienced Solver
Posts: 96
Joined: Fri Jun 17, 2005 1:53 pm
Location: Germany
Contact:

Post by MuhammadSohail » Thu Mar 02, 2006 8:54 pm

How can user edit wxChoicebook labels and wxCombobox text.

cpp
I live to help wx-kind
I live to help wx-kind
Posts: 195
Joined: Wed Sep 28, 2005 9:42 pm

Post by cpp » Thu Mar 02, 2006 10:03 pm

Like ABX said, wxChoicebook has the same interface as wxNotebook,
to edit the wxChoicebook labels, use the SetPageText() function.
Hier Kommt die Sonne...

User avatar
ABX
Can't get richer than this
Can't get richer than this
Posts: 810
Joined: Mon Sep 06, 2004 1:43 pm
Location: Poznan, Poland
Contact:

Post by ABX » Thu Mar 02, 2006 10:12 pm

Muhammad Sohail wrote:How can user edit wxChoicebook labels and wxCombobox text.
As people wrote working on manual at http://www.wxwidgets.org/manuals/2.6.2/ ... etpagetext and http://www.wxwidgets.org/manuals/2.6.2/ ... ssetstring it is wxChoicebook::SetPageText(size_t page, const wxString& text) and wxCombobox::SetString(int n, const wxString& string). If manual is not for finding such things, then for what? ;)

ABX
CVS Head, 2.8.X
wxMSW, wxWinCE, wxPalmOS, wxOS2, wxMGL, bakefile
gcc 3.2.3, bcc 5.51, dmc 8.48, ow 1.6, vc 7.1, evc 3/4, pods 1.2

Post Reply