Hello every body i just start with wx, I dont know if is possible of send parameters from dialog to another or access datas of dialogs
I have to dialogs one had the grid and buttons for add new register to sqlite but i need to know when is new or edit register something like that.
GpoDatdlg* dlgdats = new GpoDatdlg(this, lnew );
or
dlgdats.lnew = true or false
Hope some body can help me with that.
Send Parameters to dialogs
- xaviou
- Super wx Problem Solver
- Posts: 437
- Joined: Mon Aug 21, 2006 3:18 pm
- Location: Annecy - France
- Contact:
Re: Send Parameters to dialogs
Hi.
As the dialog class will be yours, derived from wxDialog, you can make the constructor accept any parameters you'll need.
And / Or you can create accessors to set the parameter.
Regards
Xav'
As the dialog class will be yours, derived from wxDialog, you can make the constructor accept any parameters you'll need.
And / Or you can create accessors to set the parameter.
Code: Select all
class GpoDatdlg : public wxDialog
{
public:
GpoDatdlg(wxWindow *parent, bool lnew);
......
};
GpoDatdlg::GpoDatdlg(wxWindow *parent, bool lnew) : wxDialog(parent, -1, _T("Dialog title"))
{
......
if (lnew)
....
}
Xav'
My wxWidgets stuff web page : X@v's wxStuff
Re: Send Parameters to dialogs
Hi,
Also keep in mind that it is not recommended to create a wxDialog-derived class on the heap.
Thank you.
Also keep in mind that it is not recommended to create a wxDialog-derived class on the heap.
Thank you.