That's exactly what I want (actually, that's what my boss wants). Is there a built-in button that could achieve this?DerKleineNik wrote:Or do you want the user to be forced to hold down the button all the time while the motion runs?
Search found 10 matches
- Wed Dec 07, 2011 3:03 am
- Forum: C++ Development
- Topic: How to catch wxToolBar button down and button up
- Replies: 10
- Views: 3338
Re: How to catch wxToolBar button down and button up
- Fri Dec 02, 2011 10:23 pm
- Forum: C++ Development
- Topic: How to catch wxToolBar button down and button up
- Replies: 10
- Views: 3338
Re: How to catch wxToolBar button down and button up
Thank you both for your reply. I was able to finally make it work, by a wxBitmapButton derived class that handles EVT_LEFT_DOWN/UP and using AddControl() to add to the toolbar. Downside is, when the toolbar style changes (between bitmap only, text only, or both), need to update the bitmap of the but...
- Fri Dec 02, 2011 5:57 pm
- Forum: C++ Development
- Topic: How to catch wxToolBar button down and button up
- Replies: 10
- Views: 3338
How to catch wxToolBar button down and button up
I want to catch the moments when a toolbar button is getting pressed down and released up. The toolbar button is created by calling wxToolBar function AddTool(). The macro EVT_TOOL only gets the moment of releasing up. I have tried the wxMouseEvent macros EVT_LEFT_DOWN and EVT_LEFT_UP in the wxFrame...
- Fri Aug 19, 2011 10:21 pm
- Forum: C++ Development
- Topic: Toolbar button no response after disable/re-enable unless...
- Replies: 9
- Views: 2721
Re: Toolbar button no response after disable/re-enable unles
I think it is wxGTK. The wxWidgets directory has name "wxGTK-2.8.11". Other than that I don't know where to check for sure.
- Fri Aug 19, 2011 10:00 pm
- Forum: C++ Development
- Topic: Toolbar button no response after disable/re-enable unless...
- Replies: 9
- Views: 2721
Re: Toolbar button no response after disable/re-enable unles
I just did a quick test, and Yes, it works on Windows. But not on my version of linux (Ubuntu Hardy). Here's the complete code of the quick test, if anyone can give it a try on their ubuntu box. Thanks. #include <wx/wx.h> #include <wx/artprov.h> #include <wx/timer.h> class App : public wxApp { publi...
- Fri Aug 19, 2011 9:34 pm
- Forum: C++ Development
- Topic: Toolbar button no response after disable/re-enable unless...
- Replies: 9
- Views: 2721
Re: Toolbar button no response after disable/re-enable unles
It's wx2.8.11 on Ubuntu 8.04.
- Fri Aug 19, 2011 9:00 pm
- Forum: C++ Development
- Topic: Toolbar button no response after disable/re-enable unless...
- Replies: 9
- Views: 2721
Re: Toolbar button no response after disable/re-enable unles
Tried Realize(), Refresh(), and combination, none worked.
- Fri Aug 19, 2011 6:52 pm
- Forum: C++ Development
- Topic: Toolbar button no response after disable/re-enable unless...
- Replies: 9
- Views: 2721
Toolbar button no response after disable/re-enable unless...
I have a toggle toolbar button. I'd like to achieve this: Upon clicking on it, it will disable itself and start a 1-second timer. When the timer is called, it will re-enable that same button. This only works if I click the button, move the mouse pointer outside of the button and back, then the butto...
- Wed Jan 12, 2011 11:23 pm
- Forum: C++ Development
- Topic: GtkWindow from wxWindow GetHandle
- Replies: 2
- Views: 6883
- Tue Jan 11, 2011 11:23 pm
- Forum: C++ Development
- Topic: GtkWindow from wxWindow GetHandle
- Replies: 2
- Views: 6883
GtkWindow from wxWindow GetHandle
I'm using ubuntu hardy with wxWidgets 2.8. I need to get XID from a window for image stream display, so I used the following: wxWindow* window_; ... GtkWidget* widget = window_->GetHandle(); XID xid = GDK_WINDOW_XWINDOW(widget->window); This does not give any error, but no image gets shown. I tried ...