Search found 38 matches

by grf
Tue Jan 22, 2008 1:54 pm
Forum: C++ Development
Topic: Changing the text color of a wxRadioButton
Replies: 13
Views: 2078

I'm using wxMSW (2.8.7).

Regards
Michael
by grf
Fri Jan 18, 2008 3:36 pm
Forum: C++ Development
Topic: Changing the text color of a wxRadioButton
Replies: 13
Views: 2078

Getting wxWidgets to look the way you want it to sure is a pain in the ass ... No, I don't think so. :wink: It would be helpful if you could post some more code. I also set the foreground color of my radiobuttons in a way like this: rb_one= new wxRadioButton(notebook_panel, RB_ONE_ID, wxT("One"), w...
by grf
Tue Jan 15, 2008 12:34 pm
Forum: C++ Development
Topic: Changing the text color of a wxRadioButton
Replies: 13
Views: 2078

And after this you should call

Code: Select all

this->Refresh();
Sorry, I forgot this...

Regards
Michael
by grf
Mon Jan 14, 2008 11:03 am
Forum: C++ Development
Topic: Changing the text color of a wxRadioButton
Replies: 13
Views: 2078

Use

Code: Select all

m_pRadioButton->SetOwnForegroundColour (wxColor (255, 0, 0, 255));
and it will work. :wink:

Hopefully...

Regards
Michael
by grf
Mon Dec 03, 2007 11:34 am
Forum: The Code Dump
Topic: wxGrid with MS Excel (copy/paste)
Replies: 10
Views: 11571

A late reply from me, but today I had the same problem. A keyboard handler could be implemented like the following snipplets: While creating the grid you need to connect the copy/paste function like this: my_grid = new wxGrid(my_panel, -1, wxPoint(0, 0), wxSize(300, 300)); //connect the grid to the ...
by grf
Fri Mar 23, 2007 10:19 am
Forum: Component Writing
Topic: Getting Size with GetSize() fails for wxBufferedPaintDC
Replies: 2
Views: 970

Re: Getting Size with GetSize() fails for wxBufferedPaintDC

this returns the region on the screen that needs to be redrawn (due to overlapping by other windows or resizing). It is not always equal to the window size. In you code: this->GetClientSize() would give the right size. You are right, that was the problem! Now it runs as expected. Thank you! :) Rega...
by grf
Tue Mar 20, 2007 3:55 pm
Forum: C++ Development
Topic: Send/Generate keyboard events (tab, shift+tab and return)
Replies: 16
Views: 1918

I looked also (since last week) in newsgroups for a solution with wxMSW. I found some interesting information: http://groups.google.de/group/comp.soft-sys.wxwindows/browse_thread/thread/87f20c162c1a7d8d/79153050b3307408?lnk=gst&q=wxpostevent+return&rnum=18#79153050b3307408 "At least for wxTextCtrl y...
by grf
Tue Mar 20, 2007 12:18 pm
Forum: C++ Development
Topic: Non-event-driven loop with wx?
Replies: 10
Views: 927

Hi, I think you need a timely defined behaviour for your monsters. :) Therefore wxTimer should be a suitable solution: Start the timer: wxTimer monster_game_timer; monster_game_timer.SetOwner(this, MONSTER_TIMER); monster_game_timer.Start(1000, false); //fired every 1000ms and write an event handler...
by grf
Tue Mar 20, 2007 12:05 pm
Forum: C++ Development
Topic: Send/Generate keyboard events (tab, shift+tab and return)
Replies: 16
Views: 1918

Hi, I just wrote such a simple handler (member function, static event table) and it was called. It means that the event was passed to it. Ok so far... However, when I try to send the event without my own handler ProcessEvent() returns "false". That means, it couldn't find a suitable event handler. S...
by grf
Sat Mar 17, 2007 8:09 pm
Forum: C++ Development
Topic: Send/Generate keyboard events (tab, shift+tab and return)
Replies: 16
Views: 1918

Connect()? It connects a function with an event handler (and type), but I have no function to connect. The function which has to be triggered by this event is implemented somewhere in a library. It's the function which gives users the possibility to control applications with their keyboard... Regard...
by grf
Sat Mar 17, 2007 5:54 pm
Forum: C++ Development
Topic: Send/Generate keyboard events (tab, shift+tab and return)
Replies: 16
Views: 1918

Hi, I tested it now with an event handler for "EVT_CHAR". When I use this->GetEventHandler(); then the corresponding function will be called - it means that the event has been triggered. For all other (panel, notebook_panel and so on) no function call appears. I have no idea, which event handler mus...
by grf
Fri Mar 16, 2007 9:19 pm
Forum: C++ Development
Topic: Send/Generate keyboard events (tab, shift+tab and return)
Replies: 16
Views: 1918

1. I mean (de)selecting of radiobuttons. Sorry for my English...

2. Ok, I will try this and see if this event will be generated. However I can try this maybe tomorrow...

3. I put the code in a private function of the frame.

Regards
Michael
by grf
Fri Mar 16, 2007 9:03 pm
Forum: C++ Development
Topic: Send/Generate keyboard events (tab, shift+tab and return)
Replies: 16
Views: 1918

I created the panels for the notebook with the "AddPanel" function. EDIT: Ups, I meant with the "AddPage" function: main_notebook = new wxNotebook(panel, MAIN_NOTEBOOK_ID); wxPanel *notebook_panel = new wxPanel(main_notebook, -1); const wxString page_title = wxT("Title"); main_notebook->AddPage(note...
by grf
Fri Mar 16, 2007 7:28 pm
Forum: C++ Development
Topic: Send/Generate keyboard events (tab, shift+tab and return)
Replies: 16
Views: 1918

The architecture is as follows: main panel -> notebook -> notebook panel(s) -> GridBagSizer -> buttons/radiobuttons Normally I can move the focus from button to button with the Tab key from my keyboard. De-/Activating radiobuttons and buttons can be made with the Return key from my keyboard. When I ...
by grf
Fri Mar 16, 2007 5:26 pm
Forum: C++ Development
Topic: Send/Generate keyboard events (tab, shift+tab and return)
Replies: 16
Views: 1918

Hi,

Thank you for this hint!
However is there no wxWidgets functionality which can do the same? The program is actual for windows, but I would like to make it as portable as possible...

Regards
Michael