Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

how for MDI Frames, and MDI Child Dialogs !!! #782

Open
esbvaGames opened this issue Jun 23, 2023 · 2 comments
Open

how for MDI Frames, and MDI Child Dialogs !!! #782

esbvaGames opened this issue Jun 23, 2023 · 2 comments

Comments

@esbvaGames
Copy link

esbvaGames commented Jun 23, 2023

PruebaMDI.zip
![wxFormBuilder_nICwbPl717]

(https://github.com/wxFormBuilder/wxFormBuilder/assets/5530499/9dfe2eb5-4a02-4961-a4c2-e3ffc440b253)
How can you create the MDI Frames, and the MDI Child dialogs, properly, because the parameter of the constructor here does not change, is there any example of how to use it making MDI Frames?

`
GUIFrame.h
///////////////////////////////////////////////////////////////////////////////
/// Class GDialogMDI
///////////////////////////////////////////////////////////////////////////////
class GDialogMDI : public wxMDIChildFrame
{
private:

protected:
	wxNotebook* m_notebook1;
	wxPanel* m_panel1;
	wxStaticText* m_staticText1;
	wxStdDialogButtonSizer* m_sdbSizer1;
	wxButton* m_sdbSizer1OK;
	wxButton* m_sdbSizer1Cancel;

public:

	GDialogMDI();


	//. Correction Manual ...
	/*
     You shouldn't type the text manually, since inheriting from wxMDIChildFrame,
     it should change automatically.

     The properties of wxMDIParentFrame and wxMDIChildFrame should also appear in the Editor,
     when working with MDI documents is activated, currently only wxWindow, properties
     appear. !!!
	*/
	GDialogMDI( wxMDIParentFrame* parent, wxWindowID id = wxID_ANY, const wxString& title = wxT("Child Window"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 354,259 ), long style = wxDEFAULT_DIALOG_STYLE );
	bool Create( wxMDIParentFrame* parent, wxWindowID id = wxID_ANY, const wxString& title = wxT("Child Window"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 354,259 ), long style = wxDEFAULT_DIALOG_STYLE );

	~GDialogMDI();

};

PruebaMDIMain.cpp
void PruebaMDIFrame::call_CreateMDIChild(wxCommandEvent& event)
{
DialogMDI *frm = new DialogMDI(this);
frm->Center();
frm->Show();
}

`

@esbvaGames
Copy link
Author

Another idea that could be easier to implement, could be in the toolbar, where it says "add Frame", it would be to put another similar button like "add MDI Frame", along with all the required configuration, the same would be for the creation of the Dialog, "add Dialog MDI", and all its properties, I'll see if I find some icons that could be useful, greetings, thanks, it's a good program!

@sodevel
Copy link
Member

sodevel commented Jul 5, 2023

wxFB does not support MDI, the subclass feature cannot be used because it cannot change the signature of the generated methods. Currently i don't see any other option but adding dedicated components for these widgets. However, im afraid the current type model isn't sufficient because of the special property of the child windows which must be added directly to a parent MDI window only.

TL;DR: This is quite some work for a feature Microsoft has declared to be obsolete so i have no plans to realize this. However, PR's are welcome.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants