Search found 70 matches

by nkwinder
Fri Jan 30, 2009 4:23 am
Forum: C++ Development
Topic: Casting a wxNotebook Page
Replies: 8
Views: 590

well your code works like a charm thank you very much! Just before marking this thread solved, i want to show sth that came up... void MyFrame::OnNotebookChange(wxNotebookEvent& event) { wxWindow *myWind = notebook->GetPage(event.GetSelection()); if (myWind != NULL) { wxString className = myWind->Ge...
by nkwinder
Fri Jan 30, 2009 2:08 am
Forum: C++ Development
Topic: Casting a wxNotebook Page
Replies: 8
Views: 590

as you correctly assumed, there is no intermediate class. So i'm trying to understand the second option you describe... but it's seems i'm lost :)

if you could give me a small code example it would be really appreciated.

Thank you.
by nkwinder
Fri Jan 30, 2009 12:43 am
Forum: C++ Development
Topic: Casting a wxNotebook Page
Replies: 8
Views: 590

unfortunately the order of tabs isn't fixed. Tabs are created dynamically in a user-defined order.
by nkwinder
Thu Jan 29, 2009 11:52 pm
Forum: C++ Development
Topic: Casting a wxNotebook Page
Replies: 8
Views: 590

Casting a wxNotebook Page

Hello i have a notebook which contains many pages, each page being a different kind of wx derived class. I want to take a pointer to the currently selected page. But how can i find out which type of class is currently shown, so to be able to make the appropriate cast? I mean... GetCurrentPage() retu...
by nkwinder
Mon Jan 26, 2009 2:19 pm
Forum: C++ Development
Topic: Hide a window before creation
Replies: 3
Views: 800

yeah this seams to work :)

thanks a lot!
by nkwinder
Mon Jan 26, 2009 1:55 pm
Forum: C++ Development
Topic: Disabling menus?
Replies: 6
Views: 963

yeah i know the other options. :cry:

photoshop has this (disabled submenus). Makes sense. There is an arrow, meaning that this is a submenu, but it's grayed out and the submenu won't open.

it would be a nice feature.

thanks
by nkwinder
Mon Jan 26, 2009 3:02 am
Forum: C++ Development
Topic: Disabling menus?
Replies: 6
Views: 963

sorry for answering in such an old thread, but i have the same question.

How can a menu be disabled?? (so that its submenu won't open?)

thanks
by nkwinder
Mon Jan 26, 2009 12:27 am
Forum: C++ Development
Topic: Hide a window before creation
Replies: 3
Views: 800

Hide a window before creation

Is there a way to tell wxWidgets to hide the window (or anything derived from it) while being created? i ask this because i encountered this: I create some scrollWindows and grids at runtime, and i place them inside a notebook as pages. The thing is that during creation i see some flickering (black ...
by nkwinder
Sun Jan 25, 2009 10:00 pm
Forum: C++ Development
Topic: wxGrid flicker and selection color
Replies: 0
Views: 238

wxGrid flicker and selection color

hello again two simple questions/issues 1. I create a grid inside a notebook. I set a specific color for the selection background. When i change notebook tabs, or when the selection looses focus or sth (i click outside notebook), the selection color turns into a grey (160,160,160). Any idea why is t...
by nkwinder
Sat Jan 24, 2009 10:26 pm
Forum: C++ Development
Topic: mouse capture and rapid events
Replies: 17
Views: 2597

hmm well yes, i would have done it, but i'm still new to wxWidgets, and i don't have the knowledge to start adding my stuff into documentation :)

but it's good to know that i have the ability to contribute. ;)
by nkwinder
Sat Jan 24, 2009 6:57 pm
Forum: C++ Development
Topic: mouse capture and rapid events
Replies: 17
Views: 2597

ok mystery solved!! thank you all! doublemax ;)

p.s isn't this something that documentation should mention?
by nkwinder
Sat Jan 24, 2009 6:05 pm
Forum: C++ Development
Topic: mouse capture and rapid events
Replies: 17
Views: 2597

sorry... i forgot const. Now it works as expected. One last question though, before i mark this thread solved. What if i would like, to alter this behavior at run time? For example it would be good to have this autoscroll behavior in a marquee selection tool, but not in a hand drag and move tool. As...
by nkwinder
Sat Jan 24, 2009 3:45 pm
Forum: C++ Development
Topic: mouse capture and rapid events
Replies: 17
Views: 2597

yeah this makes sense... scrolwin.h // are we generating the autoscroll events? bool IsAutoScrolling() const { return m_timerAutoScroll != NULL; } // stop generating the scroll events when mouse is held outside the window void StopAutoScrolling(); // this method can be overridden in a derived class ...
by nkwinder
Sat Jan 24, 2009 2:20 am
Forum: C++ Development
Topic: mouse capture and rapid events
Replies: 17
Views: 2597

maybe. i'm on vista.
by nkwinder
Sat Jan 24, 2009 12:09 am
Forum: C++ Development
Topic: mouse capture and rapid events
Replies: 17
Views: 2597

ok i made a test project, to reproduce the scrollbars issue, with the minimum amount of code. enough with talking, let the code speak :) #ifndef TESTAPP_H #define TESTAPP_H #include <wx/app.h> class testApp : public wxApp { public: virtual bool OnInit(); }; #endif // TESTAPP_H #ifdef WX_PRECOMP #inc...