Search found 11 matches

by Lightman
Mon Sep 12, 2011 5:43 pm
Forum: C++ Development
Topic: problem resizing wxStaticBitmap inside wxBoxSizer
Replies: 4
Views: 8460

Re: problem resizing wxStaticBitmap inside wxBoxSizer

Thanks a lot, now it works ! The problem was because of default min/max size of wxStaticBitmap. Solution: 1. Put your image to wxStaticBitmap (or just change its size) 2. call wxStaticBitmap->SetMinSize() and wxStaticBitmap->SetMaxSize() with current bitmap size values, 3. possibly call sizer->Layou...
by Lightman
Mon Sep 12, 2011 3:51 pm
Forum: C++ Development
Topic: problem resizing wxStaticBitmap inside wxBoxSizer
Replies: 4
Views: 8460

Re: problem resizing wxStaticBitmap inside wxBoxSizer

What I did: 1) added wxRESIZE_BORDER to TestDialog's Style (my fault I didn't done it earlier), 2) replaced Layout() call with Fit() or SetSizeHint() call - the only difference is: when I do call Layout(), the bitmap is displayed inside original 90x90 size, and if I do not call Layout(), wxStatibBit...
by Lightman
Mon Sep 12, 2011 4:08 am
Forum: C++ Development
Topic: problem resizing wxStaticBitmap inside wxBoxSizer
Replies: 4
Views: 8460

problem resizing wxStaticBitmap inside wxBoxSizer

Strange things happen when I'm trying to resize wxStaticBitmap... Example 1 (real situation). I have a complicated frame (built using wxSizers in wxSmith) containing wxStaticBitmap with some initial size (see screenshot here: http://s58.radikal.ru/i159/1109/fa/07ad11a9486a.jpg ). Everything is all r...
by Lightman
Mon Aug 22, 2011 10:47 am
Forum: Component Writing
Topic: New events in own class
Replies: 15
Views: 8581

Re: New events in own class

Great, now it works, thanks !! But I had to write Connect(wxEVT_COMMAND_SPINCTRL_UPDATED,(wxObjectEventFunction)&MyFrameSpinTestDialog::OnFrameChange, NULL, this); instead of Connect(wxEVT_COMMAND_SPINCTRL_UPDATED,wxSpinEventHandler(MyFrameSpinTestDialog::OnFrameChange), NULL, this); ...and what...
by Lightman
Mon Aug 22, 2011 8:27 am
Forum: Component Writing
Topic: New events in own class
Replies: 15
Views: 8581

Re: New events in own class

Thanks a lot, I'm almost in... Still hadn't understood: 1) How could I know which event-type (int) should I use in Connect(), if I don't specify any event-type (int) in wxPostEvent() ? I was trying to post less code to save your time :), but if you wish, I can post almost everything: myframespin.h: ...
by Lightman
Sun Aug 21, 2011 10:56 am
Forum: Component Writing
Topic: New events in own class
Replies: 15
Views: 8581

Re: New events in own class

I need to pass just one integer, so I think wxCommandEvent will be the best choice. I think there are no need to declare custom event type - that's just a waste of time here, I'll be comfortable with wxCommandEvent. There are only four things left: 1) to declare my event (of wxCommandEvent type) in ...
by Lightman
Sun Aug 21, 2011 9:32 am
Forum: Component Writing
Topic: New events in own class
Replies: 15
Views: 8581

Re: New events in own class

Thanks, I had corrected my code and now myFrameSpin is derived from wxPanel. Yes, it's supposed to be a visible control. Why does it need to be another event? First (my) way : I have one myFrameSpin on a wxFrame, and one myOnChange event handler on parent wxDialog, which just gets a value ready to b...
by Lightman
Sat Aug 20, 2011 2:14 pm
Forum: Component Writing
Topic: New events in own class
Replies: 15
Views: 8581

Re: New events in own class

I had understood that you said, but if I do so, I'll be unable to handle btn's OnSpin event inside myFrameSpin. Let me shortly explain the idea of myFrameSpin: it's a wxWindow with an wxTextCtrl and wxSpinButton. When user enters something to wxTextCtrl (not shown in listed sources) or clicks wxSpin...
by Lightman
Sat Aug 20, 2011 8:55 am
Forum: Component Writing
Topic: New events in own class
Replies: 15
Views: 8581

Re: New events in own class

Thanks for links, I had already read that, but still unable to understand :) I'd learned events sample, but it handles class events inside this class only, and I need to connect to another class to catch its events. Possibly it will be more understandable if I list some code here: myframespin.h: cla...
by Lightman
Wed Aug 17, 2011 7:26 am
Forum: Component Writing
Topic: New events in own class
Replies: 15
Views: 8581

Re: New events in own class

Well, it's not very important about wxSmith, so we can change the first quection to:
1) how can I declare my own events in my component ? (I will Connect() to them later in run-time).
by Lightman
Sun Aug 14, 2011 11:52 am
Forum: Component Writing
Topic: New events in own class
Replies: 15
Views: 8581

New events in own class

I'm developing my own class (myFrameSpin) derived from wxWindow (it contains a wxTextCtrl and wxSpinButton). 1) I need to declare my own event in myFrameSpin of a standard event type (something like wxSpinEvent; no need to create own event type), so that this event must be "visible" on the...