Search found 22 matches

by Antipole
Sun Mar 14, 2021 2:27 pm
Forum: C++ Development
Topic: Reordering sibling windows
Replies: 19
Views: 847

Re: Reordering sibling windows

You might try the wxSTAY_ON_TOP style on your frame. I cannot use that on a frame because it would put the non-active consoles behind the main application window... however, it does work amongst wxDialogs. So... still having my consoles as wxDialogs to keep them all on top of the main application f...
by Antipole
Sun Mar 14, 2021 12:26 pm
Forum: C++ Development
Topic: Reordering sibling windows
Replies: 19
Views: 847

Re: Reordering sibling windows

Doing a search for wxFRAME_FLOAT_ON_PARENT in the wx sources, it seems that OSX does not support it. Well, that explains why it does not work for me. I am MacOS-based and the application needs to work cross-platform. Looks like I have to stay with wxDialog and find a way of processing a mouse click...
by Antipole
Thu Mar 11, 2021 5:53 pm
Forum: C++ Development
Topic: Reordering sibling windows
Replies: 19
Views: 847

Re: Reordering sibling windows

Sorry - not sure of your question. I am using wxFormBuilder, which generates the constructors. If I set wxFormBuilder to send a wxActivateEvent from the wxDialog, I get that OK void Console::OnActivate(wxActivateEvent& event){ if (event.GetActive()) { cout << "Activated\n"; wxDialog* dialog = wxDyna...
by Antipole
Thu Mar 11, 2021 5:32 pm
Forum: C++ Development
Topic: Reordering sibling windows
Replies: 19
Views: 847

Re: Reordering sibling windows

Alas, wxFRAME_FLOAT_ON_PARENT does not help. I have had to go back to using wxDialog. I have now discovered that if I Hide( ) and then Show( ) a wxDialog, this brings that wxDialog on top of the other wxDialog ones. So I tried this: void Console::OnMouse(wxMouseEvent& event){ cout << "Moused\n"; wxD...
by Antipole
Sat Mar 06, 2021 8:00 am
Forum: C++ Development
Topic: Reordering sibling windows
Replies: 19
Views: 847

Re: Reordering sibling windows

Whoops... now I have installed the plugin into its host application, a major problem. OpenCPN displays its main window containing the navigational chart. My plugin was displaying its wxDialog window on top of this. Since I switched to wxFrame, clicking anywhere on the main window brings that over th...
by Antipole
Mon Mar 01, 2021 3:18 pm
Forum: C++ Development
Topic: Reordering sibling windows
Replies: 19
Views: 847

Re: Reordering sibling windows

They were wxDialog because when I commenced this project I did not know wxWidgets nor C++. I started with an example plugin that uses wxDialog. I have now switched to wxFrame and all is working fine as wished, with no need to process any events. wxFormBuilder has no capability to change the window t...
by Antipole
Sat Feb 27, 2021 6:00 pm
Forum: C++ Development
Topic: Reordering sibling windows
Replies: 19
Views: 847

Re: Reordering sibling windows

Indeed they are non-modal. This is a JavaScript plugin for OpenCPN - a marine navigation program. A brief description of the plugin is here . I cannot use modal windows because the consoles are open for extended periods - could be months - and it would hold up the functioning of the main program. Sc...
by Antipole
Sat Feb 27, 2021 3:14 pm
Forum: C++ Development
Topic: Reordering sibling windows
Replies: 19
Views: 847

Re: Reordering sibling windows

MacOS 10.15.7 wxWidgets version 3.1.2.0 ( I cannot use a later version for compatibility reasons) Console base class m_console is generated with wxFormBuilder My Console derived class adds attributes and methods and I construct with Console(wxWindow *parent, wxString consoleName, wxPoint consolePosi...
by Antipole
Sat Feb 27, 2021 12:18 pm
Forum: C++ Development
Topic: Reordering sibling windows
Replies: 19
Views: 847

Reordering sibling windows

I have an application that creates a number of consoles, these being wxDialog windows, which are all children of the same parent frame and siblings to each other. I create consoles One, Two, and Three - all partially overlapping, so One is overlapped by Two which is overlapped by Three - this last b...
by Antipole
Thu Feb 11, 2021 4:57 pm
Forum: C++ Development
Topic: Deriving a wxButton class
Replies: 8
Views: 234

Re: Deriving a wxButton class

Mmm.. sounds like it has been fixed to make it simpler in the common wxWidgets case.
Anyhow, I now know what to do if I hit the issue again.

Many many thanks for your help.
by Antipole
Thu Feb 11, 2021 4:26 pm
Forum: C++ Development
Topic: Deriving a wxButton class
Replies: 8
Views: 234

Re: Deriving a wxButton class

Thank you Doblemax for taking the time to give me a very clear explanation. I can understand what you are saying. I adopted your first solution and it works fine. What is unclear to me is when this is necessary. I am using wxFormBuilder, which generates a basic console class for me, called m_Console...
by Antipole
Thu Feb 11, 2021 8:47 am
Forum: C++ Development
Topic: Deriving a wxButton class
Replies: 8
Views: 234

Re: Deriving a wxButton class

Can you explain some more, please?

Are you saying I need to create a wxButton instance, even if not going to use it?

thanks
by Antipole
Tue Feb 09, 2021 5:39 pm
Forum: C++ Development
Topic: Deriving a wxButton class
Replies: 8
Views: 234

Re: Deriving a wxButton class

Do you call the base constructor for wxButton ?
No - I have just done a search to confirm. ( Calls exist in another part of the application but they are not being executed during this testing.)
by Antipole
Tue Feb 09, 2021 3:44 pm
Forum: C++ Development
Topic: Deriving a wxButton class
Replies: 8
Views: 234

Deriving a wxButton class

The following is part of an alert dialogue with a button to dismiss it and it works just fine. alert = new wxDialog (etc etc.); alert->SetSizer(boxSizer); wxBoxSizer* buttonBox = new wxBoxSizer(wxHORIZONTAL); boxSizer->Add(buttonBox, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5); wxButton* button = new wxB...
by Antipole
Thu Oct 08, 2020 5:51 am
Forum: C++ Development
Topic: Help needed with using validator please
Replies: 2
Views: 206

Re: Help needed with using validator please

@doublemax...thank you for your help. (1) This is a JavaScript plugin for OpenCPN - a marine navigation program. I cannot use ShowModal() because that stops all other processing until the user completes the dialogue. I need to yield until OK (I have not got that far yet) or adopt my approach whereby...