Search found 19136 matches
- Sun Dec 02, 2012 2:30 pm
- Forum: C++ Development
- Topic: How does wxAppTraits::GetDesktopEnvironment work?
- Replies: 3
- Views: 957
Re: How does wxAppTraits::GetDesktopEnvironment work?
What I wanted to know is how wxWidgets does the detection internally. The code is in the file i mentioned above. Here it is: static wxString GetSM() { wxX11Display dpy; if ( !dpy ) return wxEmptyString; char smerr[256]; char *client_id; SmcConn smc_conn = SmcOpenConnection(NULL, NULL, 999, 999, 0 /...
- Sun Dec 02, 2012 2:23 pm
- Forum: C++ Development
- Topic: class derived from wxListCtrl, but tab order no effect
- Replies: 3
- Views: 1367
Re: class derived from wxListCtrl, but tab order no effect
Does it work in the "listctrl" sample? What do you expect to happen when you press TAB inside the listctrl?when I click one row, tab key not work too...
- Sun Dec 02, 2012 11:06 am
- Forum: C++ Development
- Topic: How to get the mouse events on wxStaticBitmap?
- Replies: 2
- Views: 1268
Re: How to get the mouse events on wxStaticBitmap?
How do you catch the events? Mouse events don't propagate to parent controls, so you have to catch them at the object itself. That means you either have to derive your own class from wxStaticBitmap or you have to use Connect(). An entry in the event table macro of the wxFrame won't work.
- Sun Dec 02, 2012 10:57 am
- Forum: C++ Development
- Topic: Mouse wheel event in wxGauge
- Replies: 13
- Views: 6942
Re: Mouse wheel event in wxGauge
Ok, i tested this now. The problem is that a wxGauge doesn't get focus when you click it. And mouse wheel events always go to the control that has focus. I works if you catch the mouse click event on the wxGauge and in its event handler you call SetFocus(). But i'm still not sure that it's a good id...
- Sun Dec 02, 2012 10:33 am
- Forum: C++ Development
- Topic: class derived from wxListCtrl, but tab order no effect
- Replies: 3
- Views: 1367
Re: class derived from wxListCtrl, but tab order no effect
Which platform and wxWidgets version?
Do you have a wxPanel as parent for the wxListCtrl? If not, do that.
Do you have a wxPanel as parent for the wxListCtrl? If not, do that.
- Sun Dec 02, 2012 10:31 am
- Forum: C++ Development
- Topic: Beginner - wxTextCtrl and wxRichTextCtrl
- Replies: 1
- Views: 645
Re: Beginner - wxTextCtrl and wxRichTextCtrl
Your question is not clear. If you only want one control, why to you create two?
Why don't you call DragAcceptFiles() on the wxRichTextCtrl?
You should check the "dnd" sample that comes with wxWidges. Also, read the textfile "d_and_d.txt" in <wx>/samples/dnd/
Why don't you call DragAcceptFiles() on the wxRichTextCtrl?
You should check the "dnd" sample that comes with wxWidges. Also, read the textfile "d_and_d.txt" in <wx>/samples/dnd/
- Sun Dec 02, 2012 10:28 am
- Forum: C++ Development
- Topic: How does wxAppTraits::GetDesktopEnvironment work?
- Replies: 3
- Views: 957
Re: How does wxAppTraits::GetDesktopEnvironment work?
Your question is not clear.
Do you want to know how to use wxAppTraits::GetDesktopEnvironment?
Or do you want to know how wxWidgets does the detection internally?
Check method GetSM() in <wx>/src/gtk/utilsgtk.cpp
Do you want to know how to use wxAppTraits::GetDesktopEnvironment?
Code: Select all
wxString desktop = wxTheApp->GetTraits()->GetDesktopEnvironment();
Check method GetSM() in <wx>/src/gtk/utilsgtk.cpp
- Sun Dec 02, 2012 12:12 am
- Forum: C++ Development
- Topic: Mouse wheel event in wxGauge
- Replies: 13
- Views: 6942
Re: Mouse wheel event in wxGauge
I haven't tested it myself, but the docs for wxGauge say:
If you want to use it as a control, you probably have to write your own custom control. Which shouldn't be so hard as drawing a gauge is pretty simple.Event handling
wxGauge is read-only so generates no events.
- Sat Dec 01, 2012 6:50 pm
- Forum: C++ Development
- Topic: keyboard shortcuts (background running)
- Replies: 4
- Views: 2201
Re: keyboard shortcuts (background running)
It's implemented for MSW and OSX, but not GTK.
But it's the best wxWidgets can do for you.
But it's the best wxWidgets can do for you.
- Sat Dec 01, 2012 3:47 pm
- Forum: C++ Development
- Topic: Mouse wheel event in wxGauge
- Replies: 13
- Views: 6942
Re: Mouse wheel event in wxGauge
Does that mean you already tried and it didn't work? If yes, please show the code how you did it.
- Sat Dec 01, 2012 3:40 pm
- Forum: C++ Development
- Topic: keyboard shortcuts (background running)
- Replies: 4
- Views: 2201
Re: keyboard shortcuts (background running)
You mean you want to receive the keyboard shortcut even if your application is not active?
http://docs.wxwidgets.org/stable/wx_wxw ... sterhotkey
Otherwise, for "normal" keyboard shortcuts:
http://docs.wxwidgets.org/stable/wx_wxa ... ratortable
http://docs.wxwidgets.org/stable/wx_wxw ... sterhotkey
Otherwise, for "normal" keyboard shortcuts:
http://docs.wxwidgets.org/stable/wx_wxa ... ratortable
- Sat Dec 01, 2012 10:44 am
- Forum: C++ Development
- Topic: wxScrolledWindow forces horizontal scrollbar, no text wrap
- Replies: 4
- Views: 2598
Re: wxScrolledWindow forces horizontal scrollbar, no text wr
Using either wxHtmlWindow or wxWebView for just displaying a very simple bit of static text seems like massive overkill. But it doesn't cost you anything. And if it does the job, who cares? Besides, it seems like the desired behavior is the right behavior anyway - I think there are bugs here. I ten...
- Fri Nov 30, 2012 6:06 pm
- Forum: C++ Development
- Topic: Variable Height for a wxTreeCtrl
- Replies: 7
- Views: 2859
Re: Variable Height for a wxTreeCtrl
I remember someone else having that problem, but i can't find the post any more.
Check this modified "minimal" sample, it should give you a push in the right direction. Beware that it requires a few "hacks", so i'm not sure if it works on all platform. I only tested under MSW.
Check this modified "minimal" sample, it should give you a push in the right direction. Beware that it requires a few "hacks", so i'm not sure if it works on all platform. I only tested under MSW.
- Fri Nov 30, 2012 4:43 pm
- Forum: C++ Development
- Topic: Dynamic vertical layout with Vscrollbars
- Replies: 4
- Views: 1921
Re: Dynamic vertical layout with Vscrollbars
I copied this in the "minimal" sample, at the end of the MyFrame ctor: wxScrolledWindow *scrol = new wxScrolledWindow(this, wxID_ANY); scrol->SetScrollRate(10,10); wxSizer *sizer = new wxBoxSizer(wxVERTICAL); for(int i=0; i<40; i++) { wxString label; label << "button " << i; wxBu...
- Fri Nov 30, 2012 4:05 pm
- Forum: C++ Development
- Topic: Dynamic vertical layout with Vscrollbars
- Replies: 4
- Views: 1921
Re: Dynamic vertical layout with Vscrollbars
Just replace wxPanel with wxScrolledWindow and it should work.