Search found 30 matches

by vanarieleyen
Fri Nov 01, 2019 8:58 am
Forum: C++ Development
Topic: is semi transparency possible?
Replies: 2
Views: 176

Re: is semi transparency possible?

Ok, I will try that.
Thank you doublemax :D
by vanarieleyen
Fri Nov 01, 2019 8:33 am
Forum: C++ Development
Topic: is semi transparency possible?
Replies: 2
Views: 176

is semi transparency possible?

I am looking for a way to create semi transparent layers. To explain is simple: Suppose I have one widget that has a yellow color and a second widget with a blue color, and position these in a way that they overlap (like 2 colored glass plates) The result should be a green color. I know I can do thi...
by vanarieleyen
Fri Nov 01, 2019 8:25 am
Forum: C++ Development
Topic: wxBoxSizer not refreshing
Replies: 13
Views: 406

Re: wxBoxSizer not refreshing

Excuse me for my late response (I had a computer problem and needed to reinstall my OS) The wxBoxSizer is used on a wxFrame. There are bitmap-buttons placed using this sizer and these appear correctly in the frame. On a certain moment these buttons are removed from the sizer using boxsizer->Clear(fa...
by vanarieleyen
Wed Oct 30, 2019 3:04 am
Forum: C++ Development
Topic: wxBoxSizer not refreshing
Replies: 13
Views: 406

Re: wxBoxSizer not refreshing

Yes, you're right - I misunderstood this. But that leads me to another question. I have placed the sizers directly on the wxFrame without a panel. The sizer is only responsible for the positioning of the widgets, so the widgets are placed directly on the wxFrame. How can I clean the contents of the ...
by vanarieleyen
Tue Oct 29, 2019 9:11 am
Forum: C++ Development
Topic: wxBoxSizer not refreshing
Replies: 13
Views: 406

Re: wxBoxSizer not refreshing

I now hide the buttons as you suggested and that works.

However, I think this is a flaw in the design and should be mentioned in the docs. But Ok, I can live with it, it only needs a little changes to my code.
by vanarieleyen
Tue Oct 29, 2019 8:51 am
Forum: C++ Development
Topic: wxBoxSizer not refreshing
Replies: 13
Views: 406

Re: wxBoxSizer not refreshing

The docs mention: Detaches all children from the sizer. If delete_windows is true then child windows will also be deleted. Actually I don't want the child windows (the buttons) to be deleted I only want them to be removed from the sizer, so I assumed that 'delete_windows = false) would do that. The ...
by vanarieleyen
Tue Oct 29, 2019 8:34 am
Forum: C++ Development
Topic: wxBoxSizer not refreshing
Replies: 13
Views: 406

Re: wxBoxSizer not refreshing

Does that mean that the buttons are also deleted and need to be created again?

I thought that clear(false) only removed the appearance of the childs but apparantly not.
by vanarieleyen
Tue Oct 29, 2019 5:28 am
Forum: C++ Development
Topic: wxBoxSizer not refreshing
Replies: 13
Views: 406

wxBoxSizer not refreshing

I am most likely doing something wrong but I can't figure out what :? I have a wxBoxSizer that I dynamically fill with some buttons. The buttons are displayed without any problem. Next I perform some action in the program (fired by a click event) that is supposed to remove these buttons and place di...
by vanarieleyen
Sat Oct 26, 2019 7:47 am
Forum: C++ Development
Topic: Howto bind within a derived class?
Replies: 12
Views: 317

Re: Howto bind within a derived class?

Ahhhh, stupid ME!!

Yes, it works :D

Thank you doublemax
by vanarieleyen
Sat Oct 26, 2019 7:32 am
Forum: C++ Development
Topic: Howto bind within a derived class?
Replies: 12
Views: 317

Re: Howto bind within a derived class?

I have modified the code: class ButtonGroup : public wxBoxSizer, public wxBitmapButton { public: ButtonGroup( wxWindow *parent, int orientation = wxHORIZONTAL ): wxBoxSizer(orientation){ this->parent = parent; }; // append a button, on success return true bool Append(const wxBitmap &bitmap) { if (in...
by vanarieleyen
Sat Oct 26, 2019 7:08 am
Forum: C++ Development
Topic: Howto bind within a derived class?
Replies: 12
Views: 317

Re: Howto bind within a derived class?

When a button of the button group is clicked it should show its state (only one button of a button group can be active, the other buttons should not be active) To do this I want to call a local (within the class) function that modifies the bitmap of the clicked button and resets the bitmaps of the o...
by vanarieleyen
Sat Oct 26, 2019 6:44 am
Forum: C++ Development
Topic: Howto bind within a derived class?
Replies: 12
Views: 317

Howto bind within a derived class?

Hello, I am busy making a custom button group class which is derived from wxBoxSizer. The class seems OK, I can add buttons to it and it is correctly displayed. However, I would like to perform additional actions when a button is pressed. This event should be handled by a function within the class a...
by vanarieleyen
Wed Sep 18, 2019 8:58 am
Forum: C++ Development
Topic: wxRearrangeCtrl: Howto catch button event
Replies: 4
Views: 154

Re: wxRearrangeCtrl: Howto catch button event

No I didn't miss your reply but was busy implementing it because it looks much cleaner as what I came up with.
Thank you :D
by vanarieleyen
Wed Sep 18, 2019 7:48 am
Forum: C++ Development
Topic: wxRearrangeCtrl: Howto catch button event
Replies: 4
Views: 154

Re: wxRearrangeCtrl: Howto catch button event

After reading and experimenting I got something that 'works' In the implementation of my inherited class I have added: void RenderList::connectButtonEvent(wxWindow* pclComponent) { if (pclComponent) { pclComponent->Connect(wxID_ANY, wxEVT_BUTTON, wxCommandEventHandler(RenderList::onButton), (wxObjec...
by vanarieleyen
Wed Sep 18, 2019 6:36 am
Forum: C++ Development
Topic: wxRearrangeCtrl: Howto catch button event
Replies: 4
Views: 154

wxRearrangeCtrl: Howto catch button event

The wxRearrangeCtrl has a list box with an up and down button that is used to rearrange the items in the list box. These buttons do their job fine. However in my application I would like to perform some extra functions when any of these buttons are pressed. My first attempt was to create my own clas...