Search found 423 matches

by clyde729
Thu Nov 01, 2007 7:52 pm
Forum: C++ Development
Topic: TransferDataFromWindow strangeness
Replies: 2
Views: 926

Yes, this behaviour is... expected. If you call the "Transfer" methods on a wxWindow derived class, only the childs and grandchilds (and so on) are transferred. I had the same problem and solved it by overriding these methods and call the appropriate methods on the validator directly and d...
by clyde729
Mon Oct 22, 2007 5:03 pm
Forum: C++ Development
Topic: wxKeyEvent
Replies: 6
Views: 1663

Yes, there is a possibility. Keyevents don't propagate to the parent, so you will need to hook on every child or use some hotkey or filter methods.

Look on the previous discussion here.
by clyde729
Sun Oct 21, 2007 7:49 pm
Forum: C++ Development
Topic: wxGridWindow problem
Replies: 2
Views: 982

I don't know exactly why you need the pointer, but anyway, there are two ways on how to get the pointer: 1) Derive a class from wxGrid (called "MyGrid" in the sample) and use it as eventhandler. Do the following after creating your grid instance (i.e. in your ctor): MyGrid::MyGrid( wxWindo...
by clyde729
Sun Oct 21, 2007 7:34 pm
Forum: C++ Development
Topic: Disconnect all event handlers?
Replies: 1
Views: 800

You will need to implement some logic to find "all" eventhandlers, but in general: Yes, it is possible. You can get your mainframe by calling "wxApp::GetTopWindow" (assuming you set it before). After that you will need to recursivly run through your childwindows (use wxWindow::Ge...
by clyde729
Wed Oct 17, 2007 8:31 am
Forum: C++ Development
Topic: key bindings
Replies: 3
Views: 992

If you have a menu bar in your application, you can define your shortcuts / accelerators there. Just browse the docs for that, i.e. the Remarks of the Append method of wxMenu.
by clyde729
Tue Oct 16, 2007 1:30 pm
Forum: C++ Development
Topic: How to use wxGrid+MySql without odbc driver?
Replies: 1
Views: 900

Search the forum for wxMySQL. This is a little wrapper around the c functions provided by MySQL. Query your DB and set the results to your grid. AFAIK you will need to do this work on your own. There is no matching component out there.
by clyde729
Mon Oct 15, 2007 1:26 pm
Forum: C++ Development
Topic: how do I send an object through a socket stream?
Replies: 5
Views: 1093

The serialization is not done by the framework. You will need to do this on your own. There is something out there that can help you. Search the forum for "wxSerialize".
by clyde729
Wed Oct 10, 2007 10:42 am
Forum: C++ Development
Topic: Changes in wxFrame
Replies: 4
Views: 930

Since the wxEVT_COMMAND_TEXT_UPDATED event is a wxCommandEvent, you can catch it in your frame. Define wxID_ANY as id. You can distinguish between the controls by comparing your textctrl pointers with the event object.
by clyde729
Wed Oct 10, 2007 10:39 am
Forum: C++ Development
Topic: wxGrid - Horizontal Scrollbar
Replies: 2
Views: 789

Please have a look at this thread . The problem is the following: If you insert data, then your grid needs to display a VERTICAL scrollbar in order to allow the user scrolling the data. But the vertical one forces the grid to also show the horizontal scrollbar, since adding the vertical bar reduces ...
by clyde729
Wed Oct 10, 2007 5:44 am
Forum: Component Writing
Topic: Problem in Refreshing/reloading the Bitmap image on window
Replies: 7
Views: 2420

Which platform and wxVersion do you use? Are you doing the painting within the main thread or another thread? This is important, because you are not allowed to do GUI calls from another thread exept the main one. There are some functions that can help you (especially wxGuiMutexEnter and ...Leave). B...
by clyde729
Wed Oct 10, 2007 5:29 am
Forum: C++ Development
Topic: Couple of questions about code style
Replies: 4
Views: 1065

I think the code with the strings is o.k. I don't see anything wrong with it (even if I think that it don't look good to me). The dialog code is o.k., too. But only for dialogs. Please read the appropriate chapter wxDialog and window deletion in the docs. Besides the facts some people think it is sa...
by clyde729
Tue Oct 09, 2007 5:52 am
Forum: Component Writing
Topic: Problem in Refreshing/reloading the Bitmap image on window
Replies: 7
Views: 2420

I think it's the best to open a new issue since this isn't related to the original post. I'm no thread specialist so others may be more help for you. The only advise I could give is: Read the docs about threads, look at the samples... Oh, and don't make GUI calls within a thread other then the main ...
by clyde729
Mon Oct 08, 2007 5:12 am
Forum: C++ Development
Topic: How to catch key press globally?
Replies: 3
Views: 1545

Keyevents can only be catched by the control which has keyboard focus. To globally handle the keyevents, please have a look at this thread. The trick is to recursivly connect to all childs of the frame and pipe the events to one global handler method.
by clyde729
Fri Oct 05, 2007 10:39 am
Forum: Component Writing
Topic: Problem in Refreshing/reloading the Bitmap image on window
Replies: 7
Views: 2420

Look here: void new_dialog::ForceRefresh(void) { wxClientDC dc(this); redraw(dc); } void new_dialog::OnFileChange(wxWhatEverEvent& event) { ForceRefresh(); } void new_dialog :: OnPaint(wxPaintEvent& event) { wxPaintDC dc(this); redraw(dc); } void new_dialog::redraw(wxDC& dc) { BmpDsp(dc,...
by clyde729
Fri Oct 05, 2007 4:52 am
Forum: C++ Development
Topic: Custom Widget hanging application.
Replies: 2
Views: 731

Try to call Stop() ;-)

Your cleanup code could be placed either in wxApp::OnExit() or in the OnExit() method of a wxModule derived class.