Search found 382 matches
- Sun Apr 18, 2021 6:13 am
- Forum: Component Writing
- Topic: Creating a custom LED indicator
- Replies: 10
- Views: 236
Re: Creating a custom LED indicator
I could draw the Led, but i get those white areas... is there any way to make the component background transparent? I think calling Clear for the paint dc should fill the background in appropriately. Like so: void Led::OnPaint(wxPaintEvent& event) { wxPaintDC dc(this); dc.Clear(); ....
- Fri Mar 19, 2021 8:36 pm
- Forum: Platform Related Issues
- Topic: MSWMessageHandler example
- Replies: 6
- Views: 786
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.
- Thu Feb 25, 2021 6:33 am
- Forum: C++ Development
- Topic: How do I save drawings in a wxDC temporarily?
- Replies: 3
- Views: 139
Re: How do I save drawings in a wxDC temporarily?
I gave an example of a small drawing program in the code dump forum.
- 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: 130
Re: How to implement zoom in/out of a map on wxWidgets
I posted an example of how to do this here.
- Sun Feb 14, 2021 3:59 am
- Forum: C++ Development
- Topic: How to delete items from wxTreeCtrl?
- Replies: 15
- Views: 609
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 ...
- Sat Feb 13, 2021 3:46 am
- Forum: C++ Development
- Topic: Coverting void* to wxTreeItemId.
- Replies: 2
- Views: 182
Re: Coverting void* to wxTreeItemId.
There is no way to store a and reuse a wxTreeItemId.
From the documentation:
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.
- Fri Feb 12, 2021 8:28 pm
- Forum: C++ Development
- Topic: wxButon cannot load size
- Replies: 3
- Views: 227
- Fri Feb 12, 2021 6:45 am
- Forum: C++ Development
- Topic: How to toggle a WindowStyleFlag?
- Replies: 2
- Views: 149
Re: How to toggle a WindowStyleFlag?
There is the ToggleWindowStyle method, but as said not all flags can be changed after creation.
- Fri Feb 12, 2021 2:08 am
- Forum: Compiler / Linking / IDE Related
- Topic: Codeblocks install with wxwidgets 3.1.4
- Replies: 8
- Views: 535
Re: Codeblocks install with wxwidgets 3.1.4
I've only ever used codeblocks, so I don't know.
- Thu Feb 11, 2021 10:39 pm
- Forum: Compiler / Linking / IDE Related
- Topic: Codeblocks install with wxwidgets 3.1.4
- Replies: 8
- Views: 535
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 ...
- Thu Feb 11, 2021 10:31 pm
- Forum: C++ Development
- Topic: wxButon cannot load size
- Replies: 3
- Views: 227
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...
- Wed Feb 10, 2021 5:04 am
- Forum: C++ Development
- Topic: How to delete items from wxTreeCtrl?
- Replies: 15
- Views: 609
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 ...
- Tue Feb 09, 2021 9:35 pm
- Forum: C++ Development
- Topic: How to delete items from wxTreeCtrl?
- Replies: 15
- Views: 609
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.
- Tue Feb 09, 2021 9:07 pm
- Forum: C++ Development
- Topic: Capture ESC key on wxBusyInfo dialog
- Replies: 4
- Views: 240
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...
- Tue Feb 09, 2021 6:58 pm
- Forum: C++ Development
- Topic: How to delete items from wxTreeCtrl?
- Replies: 15
- Views: 609
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...