Search found 381 matches

by New Pagodi
Fri Mar 19, 2021 8:36 pm
Forum: Platform Related Issues
Topic: MSWMessageHandler example
Replies: 6
Views: 737

Re: MSWMessageHandler example

If you want to handle messages on windows, you should derive a class from whatever wwWidgets object you are using and override MSWOnNotify or MSWHandleMessage.
by New Pagodi
Thu Feb 25, 2021 6:33 am
Forum: C++ Development
Topic: How do I save drawings in a wxDC temporarily?
Replies: 3
Views: 134

Re: How do I save drawings in a wxDC temporarily?

I gave an example of a small drawing program in the code dump forum.
by New Pagodi
Wed Feb 24, 2021 10:54 am
Forum: C++ Development
Topic: How to implement zoom in/out of a map on wxWidgets
Replies: 1
Views: 128

Re: How to implement zoom in/out of a map on wxWidgets

I posted an example of how to do this here.
by New Pagodi
Sun Feb 14, 2021 3:59 am
Forum: C++ Development
Topic: How to delete items from wxTreeCtrl?
Replies: 15
Views: 577

Re: How to delete items from wxTreeCtrl?

This code that you provided, will it work with wxDataViewTreeCtrl as well? Of course need to change few things, but overall? Also I'm wondering if there is a way to store the containers and child of treectrl and keep track of them, to restore them back to application, when user closes and re opens ...
by New Pagodi
Sat Feb 13, 2021 3:46 am
Forum: C++ Development
Topic: Coverting void* to wxTreeItemId.
Replies: 2
Views: 170

Re: Coverting void* to wxTreeItemId.

There is no way to store a and reuse a wxTreeItemId.

From the documentation:

Code: Select all

A wxTreeItemId is not meant to be constructed explicitly by the user; only those returned by the wxTreeCtrl functions should be used. 
by New Pagodi
Fri Feb 12, 2021 8:28 pm
Forum: C++ Development
Topic: wxButon cannot load size
Replies: 3
Views: 220

Re: wxButon cannot load size

Cunoo wrote:
Fri Feb 12, 2021 8:10 pm
thanks i did it with panel but what panel meaning ? i mean whyis must be like that ?
This is what the docs say:
It is usually placed within a frame. Its main feature over its parent class wxWindow is code for handling child windows and TAB traversal
by New Pagodi
Fri Feb 12, 2021 6:45 am
Forum: C++ Development
Topic: How to toggle a WindowStyleFlag?
Replies: 2
Views: 145

Re: How to toggle a WindowStyleFlag?

There is the ToggleWindowStyle method, but as said not all flags can be changed after creation.
by New Pagodi
Fri Feb 12, 2021 2:08 am
Forum: Compiler / Linking / IDE Related
Topic: Codeblocks install with wxwidgets 3.1.4
Replies: 8
Views: 495

Re: Codeblocks install with wxwidgets 3.1.4

I've only ever used codeblocks, so I don't know.
by New Pagodi
Thu Feb 11, 2021 10:39 pm
Forum: Compiler / Linking / IDE Related
Topic: Codeblocks install with wxwidgets 3.1.4
Replies: 8
Views: 495

Re: Codeblocks install with wxwidgets 3.1.4

The deb files for codeblocks need to use the system's wxWidgets package. So you'll need to install that if you want to use codeblocks. wxWidgets can work with different versions installed. However the project files for codeblocks will use the system package by default and you'll need to change some ...
by New Pagodi
Thu Feb 11, 2021 10:31 pm
Forum: C++ Development
Topic: wxButon cannot load size
Replies: 3
Views: 220

Re: wxButon cannot load size

When a top level window such as wxFrame only has 1 child and that child is not managed by a sizer, that child is automatically resized to fill all available space. The reason for this is that such windows should only have a wxPanel as their single child. So either 1) put your button in a sizer. Or b...
by New Pagodi
Wed Feb 10, 2021 5:04 am
Forum: C++ Development
Topic: How to delete items from wxTreeCtrl?
Replies: 15
Views: 577

Re: How to delete items from wxTreeCtrl?

There is one problem though its not about wxTreeCtrl its about wxDataViewListCtrl, when say I have selected row 1 and I click on toggle column for row 8 for example, it does not add row 8's data to wxTreeCtrl, it tries to re add row 1's data, I have to select the row for which I wanna add the data ...
by New Pagodi
Tue Feb 09, 2021 9:35 pm
Forum: C++ Development
Topic: How to delete items from wxTreeCtrl?
Replies: 15
Views: 577

Re: How to delete items from wxTreeCtrl?

I don't see any reason why not. If you run through the algorithm checking for a label and !foundItem.IsOk() at the end, then there is no entry in the tree with that label.
by New Pagodi
Tue Feb 09, 2021 9:07 pm
Forum: C++ Development
Topic: Capture ESC key on wxBusyInfo dialog
Replies: 4
Views: 220

Re: Capture ESC key on wxBusyInfo dialog

I see wxBusyInfo doesn't derive from wxEvtHandler and so doesn't have a Bind method. Actually checking the documentation, you're supposed to show wxBusyInfo while doing a task that blocks the event loop. So you won't ordinarily be able to get any key events because you're blocking the event loop wit...
by New Pagodi
Tue Feb 09, 2021 6:58 pm
Forum: C++ Development
Topic: How to delete items from wxTreeCtrl?
Replies: 15
Views: 577

Re: How to delete items from wxTreeCtrl?

That's not fully equivalent to what I posted, but if it works for you it should be fine. The main difference is that you won't be checking the first item for your condition. Also, the algorithm I posted was a breadth first search. Your algorithm is an almost breadth first but slightly different orde...
by New Pagodi
Tue Feb 09, 2021 6:22 pm
Forum: C++ Development
Topic: Capture ESC key on wxBusyInfo dialog
Replies: 4
Views: 220

Re: Capture ESC key on wxBusyInfo dialog

I can not bind any event to wxBusyInfo. How can I capture the ESC in the wxBusyInfo dialog? I would like to do it just for that dialog, and not for the full frame. Maybe something like: wxBusyInfo msg ("Please move any remote control or press ESC to cancel"); msg.Bind( wxEVT_KEY_DOWN, MainPanel::On...