User forums > Using Code::Blocks
Use derived class(eg. from wxListBox) from wxSmith
(1/1)
samsam598:
Warm greetings!
Code like below:
--- Code: ---
class MyListBox:public wxListBox
{
};
--- End code ---
When I build GUI interface with wxSimth,is it possible that auto generated code uses MyListBox other than wxListBox,or where can I select to replace wxListBox in wxSmith control property toolbox?
Thanks so much for your help in advance.
Regards,
Sam
GeO:
Hi samsam598,
you can either make it with the customcontrol of wxSmith or you can make a wxListBox and then you rename the field "Class name" from wxListBox to MyListBox.
HTH GeO
samsam598:
--- Quote from: GeO on May 04, 2010, 01:56:17 pm ---Hi samsam598,
you can either make it with the customcontrol of wxSmith or you can make a wxListBox and then you rename the field "Class name" from wxListBox to MyListBox.
HTH GeO
--- End quote ---
Thank you so much GeO.I understood the method you mentioned --"rename the field "Class name" from wxListBox to MyListBox."
For the first method you've mentioned---
" make it with the customcontrol of wxSmith "
Do you mean the most right one off the standard?I will study it although I have no idea with it at this moment.
Thank you again.
Regards,
Sam
GeO:
--- Quote from: samsam598 on May 05, 2010, 11:13:20 am ---For the first method you've mentioned---
" make it with the customcontrol of wxSmith "
Do you mean the most right one off the standard?I will study it although I have no idea with it at this moment.
--- End quote ---
yes thats what i meant. With this you can define your own control. The first line in the property window ("Creating code") defines how its created(basicly the constructor)
--- Code: ---$(THIS) = new $(CLASS)($(PARENT),$(ID),$(POS),$(SIZE));
--- End code ---
$(CLASS) will be replaced by the "Class name" and so on....
HTH GeO
PS Sorry for my english
samsam598:
--- Quote from: GeO on May 05, 2010, 08:03:35 pm ---
--- Quote from: samsam598 on May 05, 2010, 11:13:20 am ---For the first method you've mentioned---
" make it with the customcontrol of wxSmith "
Do you mean the most right one off the standard?I will study it although I have no idea with it at this moment.
--- End quote ---
yes thats what i meant. With this you can define your own control. The first line in the property window ("Creating code") defines how its created(basicly the constructor)
--- Code: ---$(THIS) = new $(CLASS)($(PARENT),$(ID),$(POS),$(SIZE));
--- End code ---
$(CLASS) will be replaced by the "Class name" and so on....
HTH GeO
PS Sorry for my english
--- End quote ---
Got it.Great thanks!!
Navigation
[0] Message Index
Go to full version