Page 1 of 1 1
Topic Options
#37861 - 2003-03-12 08:50 PM KiXForm - Resizable
JensKalski Offline
Starting to like KiXtart

Registered: 2000-12-13
Posts: 186
Loc: Germany
Hi,
how can my script react on a resize of the form. I have read that only "OnClick, OnMouseDown, OnMouseMove, OnMouseUp" are events. But when I set the form with resizable = 1, how can I automatically resize and reposition all of the objects on the form. Is there an event like OnChange or so?
_________________________
Jens Kalski

Top
#37862 - 2003-03-12 08:57 PM Re: KiXForm - Resizable
Jochen Administrator Offline
KiX Supporter
*****

Registered: 2000-03-17
Posts: 6380
Loc: Stuttgart, Germany
Jens,

Chris did wrote a sample here

On the other side the 'Resizing Framework' is on the feature list for future releases , Shawn ?
_________________________



Top
#37863 - 2003-03-12 09:13 PM Re: KiXForm - Resizable
JensKalski Offline
Starting to like KiXtart

Registered: 2000-12-13
Posts: 186
Loc: Germany
OnResize and Anchors in the next release. That's it!

[Eek!]

When? When? When? When? When? When? When? When?
_________________________
Jens Kalski

Top
#37864 - 2003-03-12 09:45 PM Re: KiXForm - Resizable
Shawn Administrator Offline
Administrator
*****

Registered: 1999-08-13
Posts: 8611
Anchors will be in the next release and we hope to publish a beta release (for lack of a better term) tonight.

I have had back-off on the OnResize event for now - there a bit of a non-kixforms related issue with OnResize event in that Windows goes into a strange MODAL state when a form is resized. So basically from the script standpoint - the event happens AFTER the form has been resized. In my early testing (pre-anchors) I was really disappointed with the "results" ... the form would stretch ok but the any logic embedded in the script would be delayed ... it looked rather odd actually.

With the Anchor property though, everything is handled by Kixforms - in realtime. The way it will work is like this:

$Button.Anchor = integer

Where integer is a bit-wise combination of four values, as follows:

0 None
The control is not anchored to any edges of its container.

1 Left
The control is anchored to the left edge of its container.

2 Top
The control is anchored to the top edge of its container.

4 Right
The control is anchored to the right edge of its container.

8 Bottom
The control is anchored to the bottom edge of its container.

So lets say you had a TextBox that you want to stretch in ALL directions as the form resizes (like for example, the editable erea implemented as a TextBox in notepad) that would be anchored like this:

$TextBox.Anchor = 1+2+4+8 ; all sides

Now lets say you had a button that you wanted to anchor to the right side of the form, and as the form was made bigger, the button would appear to "stick" to the right side, that would be done like this:

$Button.Anchor = 2+4 ; top + right

Anyways - i dont want to make it sound like anchors are easy to understand and use - in fact, in my experience - to get them to work as expected takes alot of trial and error ... but the "effect" is mind-blowing and well worth the effort.

-Shawn

Top
#37865 - 2003-03-13 08:33 PM Re: KiXForm - Resizable
JensKalski Offline
Starting to like KiXtart

Registered: 2000-12-13
Posts: 186
Loc: Germany
It works. Cool!
_________________________
Jens Kalski

Top
#37866 - 2003-03-13 08:44 PM Re: KiXForm - Resizable
Shawn Administrator Offline
Administrator
*****

Registered: 1999-08-13
Posts: 8611
If your not using FRAMES in your application - you might want to enable this new feature of the form:

$Form.ClipChildren = 1

it enhances the refreshing capabilities of the form - try it out and see if it makes a difference.

Top
#37867 - 2003-03-13 09:16 PM Re: KiXForm - Resizable
JensKalski Offline
Starting to like KiXtart

Registered: 2000-12-13
Posts: 186
Loc: Germany
In my actual testform I'm using Frames. But I will test it right tomorrow at work.
_________________________
Jens Kalski

Top
Page 1 of 1 1


Moderator:  Jochen, Allen, Radimus, Glenn Barnas, ShaneEP, Ruud van Velsen, Arend_, Mart 
Hop to:
Shout Box

Who's Online
0 registered and 2220 anonymous users online.
Newest Members
Viginette, ManuvdWielNL, Sir_Barrington, batdk82, StuTheCoder
17888 Registered Users

Generated in 0.07 seconds in which 0.04 seconds were spent on a total of 12 queries. Zlib compression enabled.

Search the board with:
superb Board Search
or try with google:
Google
Web kixtart.org