Search found 19133 matches

by doublemax
Mon Dec 12, 2011 1:18 pm
Forum: C++ Development
Topic: wxToggleButton doesn't look toggled when bitmap is set?
Replies: 7
Views: 3187

Re: wxToggleButton doesn't look toggled when bitmap is set?

I think it's a bug in wxWidgets, as it can also be seen in the "widgets" sample.
by doublemax
Mon Dec 12, 2011 11:19 am
Forum: C++ Development
Topic: List control order problem
Replies: 1
Views: 589

Re: List control order problem

Code: Select all

int index = wCaptureSettings->InsertItem(0, wxT("Check"));
You probably wanted to use "i" instead of "0" in this call.
by doublemax
Mon Dec 12, 2011 11:15 am
Forum: Platform Related Issues
Topic: OSX alternative to WarpPointer?
Replies: 11
Views: 3954

Re: OSX alternative to WarpPointer?

In wx 2.9.3 WarpPointer does exist even for the Mac port. If you don't want to upgrade, maybe you can include this code into your application directly: From wx/src/osx/window_osx.cpp // Coordinates relative to the window void wxWindowMac::WarpPointer(int x_pos, int y_pos) { #if wxOSX_USE_COCOA_OR_CA...
by doublemax
Sun Dec 11, 2011 10:50 pm
Forum: C++ Development
Topic: wxAUI: How can I re-show a closed/hidden window?
Replies: 2
Views: 1181

Re: wxAUI: How can I re-show a closed/hidden window?

Code: Select all

mgr.GetPane(wxT("p_searchResults")).Show();
by doublemax
Sun Dec 11, 2011 5:21 pm
Forum: C++ Development
Topic: SetTextBackground() in wxGridCellStringRenderer
Replies: 5
Views: 2189

Re: SetTextBackground() in wxGridCellStringRenderer

Another question i have in conjunction with this, how can i find width and height of a character of a fixed-width font at a given font size? There is no dedicated method for this, usually you just use wxDC::GetTextExtent() and pass a single character string. http://docs.wxwidgets.org/stable/wx_wxdc...
by doublemax
Fri Dec 09, 2011 2:58 pm
Forum: C++ Development
Topic: Runtime Problem wyThread and wxTextctrl
Replies: 3
Views: 1452

Re: Runtime Problem wyThread and wxTextctrl

I haven't read the whole code, but you can't access gui elements (like wxTextCtrl) from secondary threads in wxWidgets. You should use a wxTimer for the gui updates. (And any frequency higher than 60Hz is pretty much useless for that because on current computer screens that's the maximum update rate...
by doublemax
Fri Dec 09, 2011 10:39 am
Forum: C++ Development
Topic: Get the border set on already existing children
Replies: 2
Views: 837

Re: Get the border set on already existing children

Is there a way to get the used border size for controls that were added previously?
wxSizer::GetItem(), then wxSizerItem::GetBorder()

http://docs.wxwidgets.org/stable/wx_wxs ... zergetitem
http://docs.wxwidgets.org/stable/wx_wxs ... mgetborder
by doublemax
Fri Dec 09, 2011 10:37 am
Forum: C++ Development
Topic: Storing Image on disk v/s drawing on the fly.
Replies: 4
Views: 1487

Re: Storing Image on disk v/s drawing on the fly.

Which one should i go with?
I think this is something you have to answer for yourself.

It really depends on how long an average redraw takes. If it's more than a few seconds it might make sense to load the bitmap from HD, especially since you already have the code to cache and re-use the bitmap.
by doublemax
Fri Dec 09, 2011 12:42 am
Forum: C++ Development
Topic: problems returning wxString
Replies: 7
Views: 2159

Re: problems returning wxString

SetChar() only works if there is already a character at that position, you can't use it when you start with an empty string.
by doublemax
Thu Dec 08, 2011 7:23 pm
Forum: Platform Related Issues
Topic: Is it possible to receive WM_INPUT messages with wxWidgets?
Replies: 5
Views: 1976

Re: Is it possible to receive WM_INPUT messages with wxWidge

WM_INPUT messages should not rely on focus, that's why you set the window handle that should receive the message with RegisterRawInputDevices(). Did you use the window handle of your DXCanvas instance there?
by doublemax
Thu Dec 08, 2011 6:13 pm
Forum: C++ Development
Topic: How to resize controls after font change
Replies: 7
Views: 2768

Re: How to resize controls after font change

I tested your code and made two small changes (marked with "DMX"). This works on Windows (2.9.3rc1) and GTK (2.9.2), but i can't test on OSX. #include "wx/wx.h" class TestApp: public wxApp { private: virtual bool OnInit(); }; class TestFrame : public wxFrame { public: TestFrame()...
by doublemax
Thu Dec 08, 2011 6:03 pm
Forum: C++ Development
Topic: wxGetKeyState assertion fail?
Replies: 3
Views: 937

Re: wxGetKeyState assertion fail?

I'm pretty sure this function is not meant to check for key combinations.