Spanish
Hola queridos usuarios del foro, me presento me llamo Edward, y hoy vengo ha haceros una pregunta respecto al compilador wxdevc++, digo esto ya que en google no poseeo ningún resultado sobre mi drama.
Bueno se trata de esto, cuando quiero realizar un proyecto con un simple boton, este boton aparece llenando toda la ventana del proyecto, quisiera saber si es un error o si algo estoy haciendo mal, debido a que queda feo y sin posibilidad de poner más botones, ya que el primer boton ocupa todo el espacio visual.
También decirles que un simple proyecto con un boton, ocupa al rededor de 10 mb como se muestra en la imagen.
English
Hello dear forum users, I present my name is Edward, and today has come to ask a question about wxdevc + + compiler, I say this because in google poseeo not any results on my drama.
Well it is this, when I want to do a project with a single button, this button appears filling the entire project window, I wonder if it is wrong or if something I'm doing wrong, because it is ugly and unable to put more buttons, as the first button occupies the entire visual space.
Also tell them a simple project with a button, occupies around 10 mb as shown in the picture.
wxdevc++ button Topic is solved
-
- Earned some good credits
- Posts: 113
- Joined: Sat Sep 24, 2011 9:32 pm
- Location: Poland
Re: wxdevc++ button
wxPanel and wxBoxSizer are objects using to arrange other controls insiade of wxFrame or wxDialog:
1) Add wxPanel inside your wxFrame, which should fulfill your frame (note: if you do not accept gray border around this panel, you should set up borders of frame on value 0 – in properties window of RAD – because default value is 5)
2) Add wxBoxSizer on your wxPanel (each panel should have sizer to arrange other objects putted on like buttons, images);
3) Than you can add your wxButton or other controls.
Regards
Jarek
1) Add wxPanel inside your wxFrame, which should fulfill your frame (note: if you do not accept gray border around this panel, you should set up borders of frame on value 0 – in properties window of RAD – because default value is 5)
2) Add wxBoxSizer on your wxPanel (each panel should have sizer to arrange other objects putted on like buttons, images);
3) Than you can add your wxButton or other controls.
Regards
Jarek
Re: wxdevc++ button
Hello jgrzybowski ! thanks for answering my question, I followed the steps that I have mentioned, the button and the window is not full, but another problem arises.jgrzybowski wrote:wxPanel and wxBoxSizer are objects using to arrange other controls insiade of wxFrame or wxDialog:
1) Add wxPanel inside your wxFrame, which should fulfill your frame (note: if you do not accept gray border around this panel, you should set up borders of frame on value 0 – in properties window of RAD – because default value is 5)
2) Add wxBoxSizer on your wxPanel (each panel should have sizer to arrange other objects putted on like buttons, images);
3) Than you can add your wxButton or other controls.
Regards
Jarek
Design is not just to compile the project, the design leaves other way (in a rebel), I want to make a design and come out well in the compilation "as they do with visual basic 6.0."
-
- Earned some good credits
- Posts: 113
- Joined: Sat Sep 24, 2011 9:32 pm
- Location: Poland
Re: wxdevc++ button
I have a problem to understand your ask. I hope you are asking about function “Compile and then run”.
regards
Jarek
regards
Jarek
- Attachments
-
- compile_and_run.JPG (24.88 KiB) Viewed 7227 times
Re: wxdevc++ button
Hi, my drama is not compiling, is on the design ... I hope to explain in this video.
http://www.youtube.com/watch?feature=pl ... 6UcbOg2-zQ
http://www.youtube.com/watch?feature=pl ... 6UcbOg2-zQ
Re: wxdevc++ button
You're using a sizer in your layout. In this case the sizer takes control over the size and position of the items. You can either work without sizers and position the items yourself. This is not recommended.
Or you can adjust the settings of the sizer or the sizer flags of the items so they create the layout you want. In your example, setting the alignment of the buttons to "TOP" should give the result you want. I don't use wxDev-C++, so i can't tell you exactly where this setting is and how it's called.
Or you can adjust the settings of the sizer or the sizer flags of the items so they create the layout you want. In your example, setting the alignment of the buttons to "TOP" should give the result you want. I don't use wxDev-C++, so i can't tell you exactly where this setting is and how it's called.
Use the source, Luke!
-
- Earned some good credits
- Posts: 113
- Joined: Sat Sep 24, 2011 9:32 pm
- Location: Poland
Re: wxdevc++ button
And you will find these settings in Property inspector window...
Regards, Jarek
Regards, Jarek
-
- Earned some good credits
- Posts: 113
- Joined: Sat Sep 24, 2011 9:32 pm
- Location: Poland
Re: wxdevc++ button
My standard procedure for new wxFrame:
1)wxBoxSizer fulfill my frame, I setup sizer on wxHorizontal;
2)next are wxPanels (for example panel for header and for bottom buttons) and each panel got also wxBoxSizer this time I set up sizers wxVertical;
3)Other controls I put inside of panels which are arrange by sizers;
In so simple program you need only one wxBoxSizer fullfil your frame. Buttons you can put on sixer, which is by default set up on wxVertical (that is why buttons are in one row).
Regards
Jarek
1)wxBoxSizer fulfill my frame, I setup sizer on wxHorizontal;
2)next are wxPanels (for example panel for header and for bottom buttons) and each panel got also wxBoxSizer this time I set up sizers wxVertical;
3)Other controls I put inside of panels which are arrange by sizers;
In so simple program you need only one wxBoxSizer fullfil your frame. Buttons you can put on sixer, which is by default set up on wxVertical (that is why buttons are in one row).
Regards
Jarek