Resizing panels and such

Everything else that doesn't fall into one of the other PB categories.
Karbon
PureBasic Expert
PureBasic Expert
Posts: 2010
Joined: Mon Jun 02, 2003 1:42 am
Location: Ashland, KY
Contact:

Resizing panels and such

Post 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!
-Mitchell
Check out kBilling for all your billing software needs!
http://www.k-billing.com
Code Signing / Authenticode Certificates (Get rid of those Unknown Publisher warnings!)
http://codesigning.ksoftware.net
Fred
Administrator
Administrator
Posts: 18350
Joined: Fri May 17, 2002 4:39 pm
Location: France
Contact:

Post by Fred »

You can resize any gadget with ResizeGadget() command, no problem at all. If you use the API, it's another problem..
Karbon
PureBasic Expert
PureBasic Expert
Posts: 2010
Joined: Mon Jun 02, 2003 1:42 am
Location: Ashland, KY
Contact:

Post by Karbon »

That's in the beta - right?
-Mitchell
Check out kBilling for all your billing software needs!
http://www.k-billing.com
Code Signing / Authenticode Certificates (Get rid of those Unknown Publisher warnings!)
http://codesigning.ksoftware.net
Fred
Administrator
Administrator
Posts: 18350
Joined: Fri May 17, 2002 4:39 pm
Location: France
Contact:

Post by Fred »

No, since every version.. why ?
Karbon
PureBasic Expert
PureBasic Expert
Posts: 2010
Joined: Mon Jun 02, 2003 1:42 am
Location: Ashland, KY
Contact:

Post 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!
-Mitchell
Check out kBilling for all your billing software needs!
http://www.k-billing.com
Code Signing / Authenticode Certificates (Get rid of those Unknown Publisher warnings!)
http://codesigning.ksoftware.net
USCode
Addict
Addict
Posts: 924
Joined: Wed Mar 24, 2004 11:04 pm
Location: Seattle

Auto-resize controls

Post 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!
Karbon
PureBasic Expert
PureBasic Expert
Posts: 2010
Joined: Mon Jun 02, 2003 1:42 am
Location: Ashland, KY
Contact:

Post 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!
-Mitchell
Check out kBilling for all your billing software needs!
http://www.k-billing.com
Code Signing / Authenticode Certificates (Get rid of those Unknown Publisher warnings!)
http://codesigning.ksoftware.net
User avatar
tinman
PureBasic Expert
PureBasic Expert
Posts: 1102
Joined: Sat Apr 26, 2003 4:56 pm
Location: Level 5 of Robot Hell
Contact:

Post 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.
If you paint your butt blue and glue the hole shut you just themed your ass but lost the functionality.
(WinXPhSP3 PB5.20b14)
User avatar
Paul
PureBasic Expert
PureBasic Expert
Posts: 1285
Joined: Fri Apr 25, 2003 4:34 pm
Location: Canada
Contact:

Post 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. ;)
Image Image
Karbon
PureBasic Expert
PureBasic Expert
Posts: 2010
Joined: Mon Jun 02, 2003 1:42 am
Location: Ashland, KY
Contact:

Post 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!
-Mitchell
Check out kBilling for all your billing software needs!
http://www.k-billing.com
Code Signing / Authenticode Certificates (Get rid of those Unknown Publisher warnings!)
http://codesigning.ksoftware.net
Post Reply