Hi, I need to crate dialog boxes in my program in order to add some users and link the informations to a database. For example, the informations could be the name, first name, age etc which are entered by taping on the keyboard, and some other informations like the category (student, worker, etc) which should be choosen in a list box. Could somebody help me?
PS: My english is not perfect so I appologize for the mistakes that could appear in the messages that I post.
Creating complete dialog box, with forms, check buttons...
-
- Earned some good credits
- Posts: 124
- Joined: Wed Mar 16, 2005 5:44 pm
- Location: Guadeloupe, French West Indies
-
- Moderator
- Posts: 3176
- Joined: Mon Aug 30, 2004 6:55 am
- Location: Germany, Cologne
Hi!
What seems to be the exact problem?
Sure we canHi, I need to crate dialog boxes in my program in order to add some users and link the informations to a database. For example, the informations could be the name, first name, age etc which are entered by taping on the keyboard, and some other informations like the category (student, worker, etc) which should be choosen in a list box. Could somebody help me?
What seems to be the exact problem?
OS: OpenSuSE, Ubuntu, Win XP Pro
wx: svn
Compiler: gcc 4.5.1, VC 2008, eVC 4
"If it was hard to write it should be hard to read..." - the unknown coder
"Try not! Do. Or do not. There is no try." - Yoda
wx: svn
Compiler: gcc 4.5.1, VC 2008, eVC 4
"If it was hard to write it should be hard to read..." - the unknown coder
"Try not! Do. Or do not. There is no try." - Yoda
-
- Earned some good credits
- Posts: 124
- Joined: Wed Mar 16, 2005 5:44 pm
- Location: Guadeloupe, French West Indies
The problem is just that I have no idea how to do it (-.-)' . If you want some precision, I don't see with which button I can create such a dialog box containing fields to fill and cheklistbox. I want to add these information to a database after, but I think that I just need to find a connexion script for this part.
-
- Moderator
- Posts: 899
- Joined: Sun Oct 03, 2004 10:33 am
- Location: Oosterwolde, Netherlands
If you are using wxDevCpp then (assuming you already have an initial form for your main program, and you want to add a new dialog, then you select File - New - and then choose New wxDialog. You will be asked if you want to add the dialog to the current project. Select Yes.GianT wrote:The problem is just that I have no idea how to do it (-.-)' . If you want some precision, I don't see with which button I can create such a dialog box containing fields to fill and cheklistbox. I want to add these information to a database after, but I think that I just need to find a connexion script for this part.
You will need to fill in a few options (name and such) and then click on Create.
You will have a new dialog form for you to design.
Add a text control etc just as with the main form. Communicating between the dialog and your original for is then up to you.
Follow the development of my screenplay authoring program at http://wxscreenplaywriter.blogspot.com/
-
- Earned some good credits
- Posts: 124
- Joined: Wed Mar 16, 2005 5:44 pm
- Location: Guadeloupe, French West Indies
-
- Earned some good credits
- Posts: 124
- Joined: Wed Mar 16, 2005 5:44 pm
- Location: Guadeloupe, French West Indies
I did it! I manage to open my dialog by cliking on a button: For those who don't know how to do it, just copy those 3 lines from the function newProgramFrameApp::OnInit() in the newProgramFrameApp.cpp file, and paste them in the place where is to be the code of the button :
newProgramFrame *myFrame = new newProgramFrame(NULL);
//SetTopWindow(myFrame);
myFrame->Show(TRUE);
I put the second one in comment because I got compiling errors and I have not found yet which file to include. And commenting this line may be the reason why I got this problem: My dialog doesn't stay on top of the main frame... I sure put the option wx_stay_on_top but it does not work...
So if someone has an idea...
Ohh I was going to forgot, in the dialog which is added, you have to change this name #define THIS_DIALOG_STYLE to another in the header file of the dialog, if not you will get errors of compilation because the same name is used for the main frame.
newProgramFrame *myFrame = new newProgramFrame(NULL);
//SetTopWindow(myFrame);
myFrame->Show(TRUE);
I put the second one in comment because I got compiling errors and I have not found yet which file to include. And commenting this line may be the reason why I got this problem: My dialog doesn't stay on top of the main frame... I sure put the option wx_stay_on_top but it does not work...
So if someone has an idea...
Ohh I was going to forgot, in the dialog which is added, you have to change this name #define THIS_DIALOG_STYLE to another in the header file of the dialog, if not you will get errors of compilation because the same name is used for the main frame.
-
- Earned some good credits
- Posts: 124
- Joined: Wed Mar 16, 2005 5:44 pm
- Location: Guadeloupe, French West Indies