Page 1 of 1

Resizing panels and such

Posted: Tue Mar 30, 2004 2:28 pm
by Karbon
Is there any hope for support of resizing panels and container gadgets (and the gadgets contained therein)? Though I've been out of the loop for a little while I remember speaking to "the guys" on IRC (Hi Paul!) and they told me that right now there isn't a way to resize panels and the gadgets on them due to panels being implemented with the use of a hidden window or something like that..

I'm catching a lot of flak over Kapital (soon to change it's name to kBilling) not being resizable. I had the window(s) fixed sizes to fit in an 800x600 desktop but I'd like to offer dynamic sizing if I can..

I was thinking that the new support in the beta might help this problem out - does it?

Thanks!

Posted: Tue Mar 30, 2004 3:43 pm
by Fred
You can resize any gadget with ResizeGadget() command, no problem at all. If you use the API, it's another problem..

Posted: Tue Mar 30, 2004 3:53 pm
by Karbon
That's in the beta - right?

Posted: Tue Mar 30, 2004 4:53 pm
by Fred
No, since every version.. why ?

Posted: Tue Mar 30, 2004 4:57 pm
by Karbon
Hmm, strange.... I guess I must have reembered the conversations with Paul wrong as to why it wasn't yet possible to do the resizing of panels and gadgets within those panels..

I'll look into the whole thing again! Thanks!

Auto-resize controls

Posted: Tue Mar 30, 2004 6:54 pm
by USCode
:idea: It would be nice if there was an *automated* way to resize controls when the window was resized. Some way to specify which of the 4 sides of the gadget you want to *lock* to the window. Then when the window is resized, the side(s) of the gadget which are locked will then resize the same amount (either + or -) the window did. This is a nice time-saving feature Delphi, VB and RealBasic provide.

For example, if you had a listbox gadget and wanted the right and bottom of the listbox gadget to increase in size if the user resizes the right and bottom of the parent window. You would *lock* the right and bottom of the gadget in the visual designer. Then when the parent window is resized, the listbox gadget would resize in the same proportions.

Seems like this is something that could be easily automated, either in code with some special procedures or in code generated automatically by the VD.

We would just need some procedures that would register which gadgets should be automatically resized with the window and which side(s) to lock to the window (top, bottom, left, right). When the window is resized (window resize event sent), a procedure would automatically resize all those registered gadgets appropriately.

Newbie here so please let me know if that doesn't make sense or if something like that is already available.

Thanks!

Posted: Tue Mar 30, 2004 7:04 pm
by Karbon
Paul does some magic in PureVision (http://www.reelmediaproductions.com/purevision/) that allows for *some* dynamic resizing but it doesn't work with panels and such. Perhaps that's what I was thinking...

I'd love to see some automatically included feature do this too but I know it's a big one to ask for!

Thanks guys!

Posted: Tue Mar 30, 2004 7:31 pm
by tinman
ResizeGadget does work with panels - it's what I use. Hopefully it hasn't broke since the last I checked :)

I think Fred has mentioned he'd like to have automated resizing because he knows it is such a time saver for the user. And it would be a bonus for the language. UI coding is such a pain in the ass if you need to spend all your time on the mechanical side rather than the functionality side.

As an example, it took me about a year (part time) to write the code behind the layout demo on my website (which I just noticed doesn't work exactly on XP).

There was also some discussion about wxWindows in one of the forums here, which will give you an automated GUI layout system IIRC.

Posted: Tue Mar 30, 2004 9:20 pm
by Paul
Hi Karbon,

PureVision will create Dynamic resizing panels with gadgets inside...
www.reelmedia.org/test/sizetest.zip


The problem is that PB doesn't always display/refresh things properly depending on what is inside the panel. Panels just don't seem to always play by the rules. My guess is because of the hidden parent window that goes along with.

I didn't want people thinking is was a fault of PureVision but if you wish to create resizable gadgets inside of panels, you can download the latest PureVision. Just be aware that you may have display problems. ;)

Posted: Tue Mar 30, 2004 9:27 pm
by Karbon
Oh, I didn't mean to put out that impression - I'm sure it's not a limitation of PureVision at all..

PureVision is absolutely awesome, I love it!

At least I know I wasn't crazy about the panel gadget/parent window thing!