[icf-dev] How to resize editors in dynamic viewers?

Posted by LegacyUser on 08-Nov-2002 03:27

Hi!

Is there and easy way in Dynamics2 to resize editor-widgets on dynamic viewers when dynamic window is resized ?

Regards,

-Veli-Matti Korhonen

To unsubscribe, e-mail: dev-unsubscribe@icf.possenet.org

For additional commands, e-mail: dev-help@icf.possenet.org

All Replies

Posted by LegacyUser on 08-Nov-2002 03:36

Hi Veli-Matti,

By default the dynamic viewer doesn't resize, so you need to do a couple of things:

(1) Set the ResizeHorizontal and ResizeVertical attributes to YES for the viewer instance on the window.

(2) Create procedure called resizeObject in the viewer's custom super procedure. This takes 2 parameters:

pdHeightChars and pdWidthChars

(3) You can then resize the viewer's frame, and the widgets appearing on it, doing something like:

/* Get the handle to the viewer's frame. There is only one frame per dynamic viewer in Dynamics */

.

ASSIGN lPreviouslyHidden = hFrameHandle:HIDDEN

hFrameHandle:HIDDEN = YES

hFrameHandle:SCROLLABLE = TRUE

hFrameHandle:VIRTUAL-HEIGHT-CHARS = SESSION:HEIGHT-CHARS

hFrameHandle:VIRTUAL-WIDTH-CHARS = SESSION:WIDTH-CHARS

NO-ERROR.

ASSIGN hFrameHandle:HEIGHT-CHARS = pdHeightChars

hFrameHandle:WIDTH-CHARS = pdWidthChars

NO-ERROR.

/* ASSIGN EDITOR sizes here .... */

ASSIGN hFrameHandle:VIRTUAL-HEIGHT-CHARS = hFrameHandle:HEIGHT-CHARS

hFrameHandle:VIRTUAL-WIDTH-CHARS = hFrameHandle:WIDTH-CHARS

hFrameHandle:SCROLLABLE = NO

hFrameHandle:HIDDEN = lPreviouslyHidden

NO-ERROR.

Setting the scrollable, virtual-* and hidden attributes stps flashing of the frame, and prevents scrollbars.

Now you need to make sure the cache is cleared, and things should work fine.

HTH,

Peter

|-Original Message-

|From: Veli-Matti Korhonen

|Sent: Friday, November 08, 2002 10:28 AM

|To: icf-dev@possenet.org

|Subject: How to resize editors in dynamic viewers?

|

|

|Hi!

|

|Is there and easy way in Dynamics2 to resize editor-widgets on

|dynamic viewers when dynamic window is resized ?

|

|Regards,

|-Veli-Matti Korhonen

|

|

|

|To unsubscribe, e-mail: dev-unsubscribe@icf.possenet.org

|For additional commands, e-mail: dev-help@icf.possenet.org

|

|

To unsubscribe, e-mail: dev-unsubscribe@icf.possenet.org

For additional commands, e-mail: dev-help@icf.possenet.org

Posted by LegacyUser on 08-Nov-2002 05:48

Thank you very much!

I will try that...

Do you know if this will be implemented to Dynamics as a standard functionality ? It could be a property for fill-in if it can be resizable in a viewer.

Best regards,

-Veli-Matti

Lähettäjä: "Peter Judge" Päiväys: 2002/11/08 pe AM 11:36:48 GMT+02:00

Vastaanottaja: ,

Aihe: RE: How to resize editors in dynamic viewers?

Hi Veli-Matti,

By default the dynamic viewer doesn't resize, so you need to do a couple of things:

(1) Set the ResizeHorizontal and ResizeVertical attributes to YES for the viewer instance on the window.

(2) Create procedure called resizeObject in the viewer's custom super procedure. This takes 2 parameters:

pdHeightChars and pdWidthChars

(3) You can then resize the viewer's frame, and the widgets appearing on it, doing something like:

/* Get the handle to the viewer's frame. There is only one frame per dynamic viewer in Dynamics */

.

ASSIGN lPreviouslyHidden = hFrameHandle:HIDDEN

hFrameHandle:HIDDEN = YES

hFrameHandle:SCROLLABLE = TRUE

hFrameHandle:VIRTUAL-HEIGHT-CHARS = SESSION:HEIGHT-CHARS

hFrameHandle:VIRTUAL-WIDTH-CHARS = SESSION:WIDTH-CHARS

NO-ERROR.

ASSIGN hFrameHandle:HEIGHT-CHARS = pdHeightChars

hFrameHandle:WIDTH-CHARS = pdWidthChars

NO-ERROR.

/* ASSIGN EDITOR sizes here .... */

ASSIGN hFrameHandle:VIRTUAL-HEIGHT-CHARS = hFrameHandle:HEIGHT-CHARS

hFrameHandle:VIRTUAL-WIDTH-CHARS = hFrameHandle:WIDTH-CHARS

hFrameHandle:SCROLLABLE = NO

hFrameHandle:HIDDEN = lPreviouslyHidden

NO-ERROR.

Setting the scrollable, virtual-* and hidden attributes stps flashing of the frame, and prevents scrollbars.

Now you need to make sure the cache is cleared, and things should work fine.

HTH,

Peter

|-Original Message-

|From: Veli-Matti Korhonen

|Sent: Friday, November 08, 2002 10:28 AM

|To: icf-dev@possenet.org

|Subject: How to resize editors in dynamic viewers?

|

|

|Hi!

|

|Is there and easy way in Dynamics2 to resize editor-widgets on

|dynamic viewers when dynamic window is resized ?

|

|Regards,

|-Veli-Matti Korhonen

|

|

|

|To unsubscribe, e-mail: dev-unsubscribe@icf.possenet.org

|For additional commands, e-mail: dev-help@icf.possenet.org

|

|

To unsubscribe, e-mail: dev-unsubscribe@icf.possenet.org

For additional commands, e-mail: dev-help@icf.possenet.org

To unsubscribe, e-mail: dev-unsubscribe@icf.possenet.org

For additional commands, e-mail: dev-help@icf.possenet.org

Posted by LegacyUser on 08-Nov-2002 06:03

Hi Veli-Matti,

I can't comment on the future, but one of the reasons for dynamic viewers not being resizable is that viewer widgets usually stay one size - even with resizing of the viewer. There are a few exceptions, such as editors, but usually things like buttons and fill-ins do not change size with the resizing of the viewer.

However, if you do want this to be standard behaviour, log an issue for it. If you have some ideas about what should be automatically resized, or how, or anything else, put it into the issue. Alternatively, you can create your own custom override to the viewer class and do this yourself. There is also nothing stopping you createing your own classes (object types) and setting attributes against object in those classes.

HTH,

Peter

|-Original Message-

|From: Veli-Matti Korhonen

|Sent: Friday, November 08, 2002 12:49 PM

|To: dev@icf.possenet.org

|Subject: Re: RE: How to resize editors in dynamic viewers?

|

|

|Thank you very much!

|

|I will try that...

|

|Do you know if this will be implemented to Dynamics as a

|standard functionality ? It could be a property for fill-in if

|it can be resizable in a viewer.

|

|Best regards,

|-Veli-Matti

To unsubscribe, e-mail: dev-unsubscribe@icf.possenet.org

For additional commands, e-mail: dev-help@icf.possenet.org

This thread is closed