Code::Blocks Forums

User forums => Using Code::Blocks => Topic started by: Kamesh on October 15, 2008, 08:39:20 pm

Title: C::B with wxsmith, newbie question
Post by: Kamesh on October 15, 2008, 08:39:20 pm
Hi all,
I am sorry to pose this rather simple question. I created a wxsmith frame and added simple code manually to one button. Later when I added one more button to the frame the code I wrote for the first button disappeared (I think the code got over written)!! How do I retain the code I typed earlier when I make changes to the frame when adding/modifying any frame. Thank you for your answers.

Title: Re: C::B with wxsmith, newbie question
Post by: byo on October 16, 2008, 12:40:10 am
Some parts (but only parts) of source code files is automatically regenerated from scratch when anything changes in the resource. You can easily find such blocks since they start with //(* comment and end with //*) comments. Everything in such block is rewritten.
Now if you want to do something with items created, you can either do it right after the //*) comment (preffered) or by using "Extra code" property - code entered in this property will be added just after the widget is created.

Regards
   BYO
Title: Re: C::B with wxsmith, newbie question
Post by: Kamesh on October 16, 2008, 04:24:19 am
Thank you BYO. Will check.