Guidance
指路人
g.yi.org
Guidance Forums / wxWidgets (wxWindows) in C++ / wxADJUST_MINSIZE: is there any possibility to set this flag...

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

  
Forum List • Thread List • Refresh • New Topic • Search • Previous • Next First 1 Last
Message1. wxADJUST_MINSIZE: is there any possibility to set this flag...
#3489
Posted by: 2004-03-10 23:09:08
... AFTER having created all GIU elements?

We use wxDesigner which automatically creates source code, so I don't want to change this code every time ;-)

Anyway my controls (on a wxDialog) need to change their size at runtime and this will only happen if the above flag is given to the parent sizer...
In wxDesigner there is no option yet to set the flag :-((

I'm not very fond of changing the wx source code, is there any other possibility?

@upCASE: greetings to cologne from the east side ;-)

Sabine
Message2. Re: wxADJUST_MINSIZE: is there any possibility to set this flag...
#3492
Posted by: upCASE 2004-03-11 18:23:03
Hi!
Checking the sources I guess that you could call wxSizer::SetFlag(int flag) later on during runtime to set the flag. Not sure if it works though...
Try
sizer->SetFlag( sizer->GetFlag() | wxADJUST_MINSIZE );

Greetings to Leipzig! :)

upCASE
-----------------------------------
If it was hard to write, it should be hard to read!- Do. Or do not. There is no try!
Message3. Re: wxADJUST_MINSIZE: is there any possibility to set this flag...
#3493
Posted by: upCASE 2004-03-11 18:26:37
HI!
My misstake:
It's wxSizerItem::SetFlag(), not wxSizer::SetFlag().
So maybe you'd have to use wxSizer::GetChildren() and then iterate through the list setting the flag for the specific wxSizerItem.

upCASE
-----------------------------------
If it was hard to write, it should be hard to read!- Do. Or do not. There is no try!
Message4. Oh...
#3497
Posted by: 2004-03-11 21:32:52
... just now I read your answer ...

What you wrote is exactly what I did this morning. I found it by myself at last. I'm great *ggg* Nevertheless thanks to you!

Leipzig? Halle is the middle of the world ;-)

Sabine
Message5. Re: wxADJUST_MINSIZE: is there any possibility to set this flag...
#3498
Posted by: upCASE 2004-03-11 21:52:52
Hi!
Glad to hear that :)
Wel, I thought is was Leipzig since your ISP seems to be located there. Anyway Greetings to Halle! :)

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 • Refresh • New Topic • Search • Previous • Next First 1 Last
掌柜推荐
 
 
 
 
 
 
 
 
 
 
 
 
© Tue 2024-12-10  Guidance Laboratory Inc.
Email:webmaster1g.yi.org Hits:0