Developer forums (C::B DEVELOPMENT STRICTLY!) > Plugins development

wxSmith: Minor issue with TreeCtrl

(1/2) > >>

MortenMacFly:
I've dicovered 2 minor issues with the plugin:
1.) I've added a TreeCtrl to my wxSmith based application and suddenly I couldn't compile anymore. After some search I figured out (very strange?!) that if I add a treecontrol with the name "trcComposition" wxSmith adds the following entry to the CPP-file:

--- Code: ---trcComwxDefaultPositionition = new wxTreeCtrl(this,ID_TRC_COMPOSITION,wxDefaultPosition,wxDefaultSize,0);

--- End code ---
Where does the "wxDefaultPosition" come from in the control's name?
I just renamed it in the source code but it's written every time again when I change something on the GUI in wxSmith. :(
BTW: This happens only if I choose "trcComposition" as name. So if I rename it it works, but I don't know another word for "Composition"... :lol:

2.) I've added a wxNotebook with two wxPanels to te GUI. Then I added a wxTextCtrl to the first panel (which worked). Then I wanted to add a wxTextCtrl to the second wxPanel as well, but  wxSmith puts it on the same level as the wxNotebook is in the project. So it's not within the seconbd panel. Strange is that within the wxs file it seems to be at the correct postion...?!

Thanks for any help in advance.

Morten.

Urxae:

--- Quote from: MortenMacFly on December 03, 2005, 04:13:28 pm ---I've dicovered 2 minor issues with the plugin:
1.) I've added a TreeCtrl to my wxSmith based application and suddenly I couldn't compile anymore. After some search I figured out (very strange?!) that if I add a treecontrol with the name "trcComposition" wxSmith adds the following entry to the CPP-file:

--- Code: ---trcComwxDefaultPositionition = new wxTreeCtrl(this,ID_TRC_COMPOSITION,wxDefaultPosition,wxDefaultSize,0);

--- End code ---
Where does the "wxDefaultPosition" come from in the control's name?
I just renamed it in the source code but it's written every time again when I change something on the GUI in wxSmith. :(
BTW: This happens only if I choose "trcComposition" as name. So if I rename it it works, but I don't know another word for "Composition"... :lol:

--- End quote ---

Looks like wxSmith does a blind replace of "pos" with "wxDefaultPosition". Does the same thing happen if you give it another name containing the string "pos"?

MortenMacFly:

--- Quote from: Urxae on December 03, 2005, 04:56:56 pm ---Does the same thing happen if you give it another name containing the string "pos"?

--- End quote ---
I tried "trcMyPos" instead - this is working. Then I tried "trcMypos" -> it's broken. It seems you are right, just it's case-sensitive in addition. However: The second line (where the widget is added to the parent) works:

--- Code: ---fgsUpper->Add(trcMypos,1,wxALL|wxALIGN_CENTER,5);

--- End code ---
So it's really only the line where the widget is being constructed...?!

Morten.

byo:

--- Quote from: MortenMacFly on December 03, 2005, 04:13:28 pm ---I've dicovered 2 minor issues with the plugin:
1.) I've added a TreeCtrl to my wxSmith based application and suddenly I couldn't compile anymore. After some search I figured out (very strange?!) that if I add a treecontrol with the name "trcComposition" wxSmith adds the following entry to the CPP-file:

--- Code: ---trcComwxDefaultPositionition = new wxTreeCtrl(this,ID_TRC_COMPOSITION,wxDefaultPosition,wxDefaultSize,0);

--- End code ---
Where does the "wxDefaultPosition" come from in the control's name?
I just renamed it in the source code but it's written every time again when I change something on the GUI in wxSmith. :(
BTW: This happens only if I choose "trcComposition" as name. So if I rename it it works, but I don't know another word for "Composition"... :lol:

2.) I've added a wxNotebook with two wxPanels to te GUI. Then I added a wxTextCtrl to the first panel (which worked). Then I wanted to add a wxTextCtrl to the second wxPanel as well, but  wxSmith puts it on the same level as the wxNotebook is in the project. So it's not within the seconbd panel. Strange is that within the wxs file it seems to be at the correct postion...?!

Thanks for any help in advance.

Morten.


--- End quote ---

The first one: Jay, I've forgot to recode this dumb string replacing  :oops:

The second one: Try selecting panel from resource browser first and make sure that insertion type is into.

MortenMacFly:

--- Quote from: byo on December 03, 2005, 09:24:54 pm ---The first one: Jay, I've forgot to recode this dumb string replacing  :oops:

--- End quote ---
Well, if such things are the issues remaining... erm... great! :D


--- Quote from: byo on December 03, 2005, 09:24:54 pm ---The second one: Try selecting panel from resource browser first and make sure that insertion type is into.

--- End quote ---
Well... sorry to say that: But it works now. I could swear that I did the same thing 2 days ago several times - also selecting the panel before. Well, I'm only a wxWidgtes beginner - so I guess it was my fault. Sorry... :oops:

I hope you don't mind if I add another question: I found that in several controls there is a size property (for example wxTextCtrl). But whenever I specify a value here I see no change in the underlying sourcecode that is being generated. I would have expected some kind of "SetSize()" or similar. How it this done?

With best regards...

Morten.

Navigation

[0] Message Index

[#] Next page

Go to full version