Search found 9 matches
- Tue Aug 18, 2009 10:10 pm
- Forum: C++ Development
- Topic: Who deletes events?
- Replies: 5
- Views: 1017
wxQueueEvent is a special case Indeed; starting with 2.9.0 though. Yes, we do love special cases. After seeing it wasn't in 2.8 I stopped reading and didn't see that other note. In any case, the top dialog now starts a monitor dialog, which creates a child thread, which runs a method in the top dia...
- Mon Aug 17, 2009 10:50 pm
- Forum: C++ Development
- Topic: Who deletes events?
- Replies: 5
- Views: 1017
Create it on the stack. In the second case, by calling wxEvtHandler::AddPendingEvent or wxPostEvent, a copy of the event is made to be sent to the registered event handler(s). In both cases a locally scoped variable is enough. Ahhh...then they DO make a copy. It's working now, using wxPostEvent. I ...
- Mon Aug 17, 2009 8:12 pm
- Forum: C++ Development
- Topic: Who deletes events?
- Replies: 5
- Views: 1017
Who deletes events?
I see some examples of creating an event on the stack and others using the heap. Found nothing in examples or documentation about deleting them. I need to create a wxCommandEvent and use it to transport client data, which I will delete at the other end. But, what about the wxCommandEvent itself? If ...
- Sat Aug 15, 2009 4:17 am
- Forum: C++ Development
- Topic: GetScrollPos for list box
- Replies: 7
- Views: 2644
Okay, it took most of a day to move several wxWidget apps from Linux to XP/VisualStudio, but I can now compare the previous comments to the Windows implementation of wxWidgets. Unlike on linux, the Windows listbox has a normal scroll by item, instead of a soft scroll. On Linux, wxListBox::GetScrollP...
- Thu Aug 13, 2009 2:27 pm
- Forum: C++ Development
- Topic: GetScrollPos for list box
- Replies: 7
- Views: 2644
Hi. Yes the above code only tested on Windows (that's my main dev platform). Now I've tested on Fedora 11 (64 bit) with wxGTK-2.8.10 and unfortunately I've got the same error... A bug maybe? LI Yes, a platform dependency where I didn't expect it, as the first visible item should be a logical constr...
- Thu Aug 13, 2009 3:37 am
- Forum: C++ Development
- Topic: GetScrollPos for list box
- Replies: 7
- Views: 2644
wxListBox::HitTest( wxPoint(0,0) ) should return the first visible item. http://docs.wxwidgets.org/stable/wx_wxlistbox.html#wxlistboxhittest Hmmm...I hadn't suspected that one; thank you. Seems it does work, but only sometimes. Looking more carefully, I see the listbox has a smooth scroll from the ...
- Wed Aug 12, 2009 9:31 pm
- Forum: C++ Development
- Topic: GetScrollPos for list box
- Replies: 7
- Views: 2644
Hi. This one works with wxListBox int sp = m_LBSource->GetScrollPos( wxVERTICAL ); LI[/quote] Hmmm...that was what I had tried before... Using wxWidgets 2.8 on Ubuntu-64 Linux Simple listbox as below, and that function asserts. I've got about 50 dialogs/50K lines of code ported and mostly workings....
- Mon Aug 10, 2009 5:41 pm
- Forum: C++ Development
- Topic: GetScrollPos for list box
- Replies: 7
- Views: 2644
GetScrollPos for list box
I have several simple list controls that I need to synchronize. If a selection's made in one, to make a selection in another and line them up in the display. While you can SetFirstItem() to set the first visible item, you cannot GetFirstItem. Nor does GetScrollPos() seem to work on a list box. Is th...
- Sun Aug 09, 2009 2:09 pm
- Forum: C++ Development
- Topic: Set and KillFocus problem
- Replies: 8
- Views: 3159
1. Catch and treat the focus event in the wxTextCtrl Derive MyTextCtrl from wxTextCtrl, if you haven't already. Give it an event table, with the same sort of handlers as you did for TestMainWnd, but using MyTextCtrl methods of course. Live happily ever after ;) . The main reason not to do this is l...