Guidance
指路人
g.yi.org
Guidance Forums / wxWidgets (wxWindows) in C++ / How to create a wxGridSizer which... does not resize?

Register 
注册
Search 搜索
首页 
Home Home
Software
Upload

  
Forum List • Thread List • Reply • Refresh • New Topic • Search • Previous • Next First 1 Last
Message1. How to create a wxGridSizer which... does not resize?
#2785
Posted by: dejudicibus 2003-10-28 00:24:47
I need to create a grid of buttons, let say 3x4. Each button should have the same height and size of the others. The whole block should stay in a panel, and should not resize. No gap between buttons. Like a keypad.
I tried to use a wxGridSizer, but it obviously ... resize. It is ok for me that it resizes below the button, but not among the buttons, nor on the right side.

How can I do that?

DdJ
Message2. Re: How to create a wxGridSizer which... does not resize?
#2786
Posted by: upCASE 2003-10-28 00:57:38
Hi!
To be honest: I haven't "programmed" with sizers in a long time, I used wxGlade for that, but I know it can be done.
You could add a box sizer to the panel, add all buttons to a grid sizer giving one button the correct width and hight so that all will be create with these measures and then add the grid sizer to the box sizer not letting it expand...

upcase
upCASE
-----------------------------------
If it was hard to write, it should be hard to read!- Do. Or do not. There is no try!
Message3. Re: How to create a wxGridSizer which... does not resize?
#2789
Posted by: dejudicibus 2003-10-28 22:35:53
Yeah... It works. But I cannot force the sizer to honor a minimum size. My window, all its panels, subpanels and sizers shrink to ... nothing ;-) Is there a way to respect a minimum size?

P.S. What's wxGlade? I thought that sizers be the right way to do things in contrast with constraints. Is not that true anymore?

DdJ
Message4. Re: How to create a wxGridSizer which... does not resize?
#2802
Posted by: upCASE 2003-10-29 01:55:36
Hi!
wxGlade is a tool for building wxWindows GUIs. It can output XRC, python and C++ code. It really makes life easier...

upcase
upCASE
-----------------------------------
If it was hard to write, it should be hard to read!- Do. Or do not. There is no try!
Message5. Re: How to create a wxGridSizer which... does not resize?
#2805
Posted by: dejudicibus 2003-10-29 02:26:23
Is that free? Where can I get it from? Usually I prefer to code interface myself, since I can optime code. However, for fast prototyping, it may help... ;-)

DdJ
Message6. Re: How to create a wxGridSizer which... does not resize?
#2807
Posted by: upCASE 2003-10-29 03:45:47
Yep, it's free. Was written in Python and has a few bugs (still beta), but it's really cool if you don't want to mess around with sizers anymore...

Get it at http://wxglade.sourceforge.net

upcase
upCASE
-----------------------------------
If it was hard to write, it should be hard to read!- Do. Or do not. There is no try!
Forum List • Thread List • Reply • Refresh • New Topic • Search • Previous • Next First 1 Last
掌柜推荐
 
 
 
 
 
 
 
 
 
 
 
 
© Sat 2024-4-20  Guidance Laboratory Inc.
Email:webmaster1g.yi.org Hits:0