wxdevc++ button Topic is solved

If you are using wxDev-C++ for your wxWidgets design, please ask your questions here instead of in IDE Related.
Post Reply
drwd
In need of some credit
In need of some credit
Posts: 4
Joined: Mon May 06, 2013 12:57 pm

wxdevc++ button

Post by drwd »

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.

Image

Image

Image
jgrzybowski
Earned some good credits
Earned some good credits
Posts: 113
Joined: Sat Sep 24, 2011 9:32 pm
Location: Poland

Re: wxdevc++ button

Post by jgrzybowski »

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
drwd
In need of some credit
In need of some credit
Posts: 4
Joined: Mon May 06, 2013 12:57 pm

Re: wxdevc++ button

Post by drwd »

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
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.

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."

Image

Image
jgrzybowski
Earned some good credits
Earned some good credits
Posts: 113
Joined: Sat Sep 24, 2011 9:32 pm
Location: Poland

Re: wxdevc++ button

Post by jgrzybowski »

I have a problem to understand your ask. I hope you are asking about function “Compile and then run”.
regards
Jarek
Attachments
compile_and_run.JPG
compile_and_run.JPG (24.88 KiB) Viewed 7227 times
drwd
In need of some credit
In need of some credit
Posts: 4
Joined: Mon May 06, 2013 12:57 pm

Re: wxdevc++ button

Post by drwd »

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

:P
User avatar
doublemax
Moderator
Moderator
Posts: 19160
Joined: Fri Apr 21, 2006 8:03 pm
Location: $FCE2

Re: wxdevc++ button

Post by doublemax »

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.
Use the source, Luke!
jgrzybowski
Earned some good credits
Earned some good credits
Posts: 113
Joined: Sat Sep 24, 2011 9:32 pm
Location: Poland

Re: wxdevc++ button

Post by jgrzybowski »

And you will find these settings in Property inspector window...
Regards, Jarek
jgrzybowski
Earned some good credits
Earned some good credits
Posts: 113
Joined: Sat Sep 24, 2011 9:32 pm
Location: Poland

Re: wxdevc++ button

Post by jgrzybowski »

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
Attachments
wxBoxSizer-schema-from-wxWidget-book.JPG
wxBoxSizer-schema-from-wxWidget-book.JPG (46.65 KiB) Viewed 7164 times
wxBoxSizer-example.JPG
Post Reply