Discussion:
Re-Sizing a window's work area.
(too old to reply)
u***@garethlock.com
2019-03-06 11:59:33 UTC
Permalink
Can one re-size a window's work area on the fly, after a window has been created?

I'm working on !Lorum again after finally sorting out the window redraw dance. I even have scroll events sorted. The one problem I have is that I don't know the size of the output until after I create the window.

The easy way around this is to increase / decrease the work area in the Y direction to fit the output length and scroll accordingly.
Martin
2019-03-06 12:45:16 UTC
Permalink
On 06 Mar in article
Post by u***@garethlock.com
Can one re-size a window's work area on the fly, after a window has been created?
Certainly. See SWI Wimp_SetExtent
--
Martin Avison
Note that unfortunately this email address will become invalid
without notice if (when) any spam is received.
News
2019-03-06 13:08:46 UTC
Permalink
Post by u***@garethlock.com
Can one re-size a window's work area on the fly, after a window has been created?
Wimp_SetExtent.
--
Chris Johnson
u***@garethlock.com
2019-03-06 15:25:39 UTC
Permalink
Ok... Thanks all... Just working out how to best implement it in code.

I'm assuming you can use the same call to shrink as well...
Martin
2019-03-06 16:19:23 UTC
Permalink
On 06 Mar in article
Post by u***@garethlock.com
Ok... Thanks all... Just working out how to best implement it in code.
I'm assuming you can use the same call to shrink as well...
Yup
But see restriction re visible area (see PRMs or StrongHelp manual)
--
Martin Avison
Note that unfortunately this email address will become invalid
without notice if (when) any spam is received.
News
2019-03-06 16:24:48 UTC
Permalink
Post by u***@garethlock.com
Ok... Thanks all... Just working out how to best implement it in code.
I'm assuming you can use the same call to shrink as well...
Yes. The caveat is that you cannot make the new work area smaller
than the current size of the visible window. If you do need to shrink
it smaller than the current size then call Wimp_OpenWindow with a
very small size, change the extent, then do another Wimp_OpenWindow
at your new required size.

The SWI takes only two parameters. R0 = window handle. R1 is a
pointer to a block - new min x, new min y, new max x, new max y.
--
Chris Johnson
Steve Fryatt
2019-03-06 18:16:54 UTC
Permalink
On 6 Mar, News wrote in message
The caveat is that you cannot make the new work area smaller than the
current size of the visible window. If you do need to shrink it smaller
than the current size then call Wimp_OpenWindow with a very small size,
change the extent, then do another Wimp_OpenWindow at your new required
size.
Can't you just call Wimp_OpenWindow to size and scroll the window as
required, then call Wimp_SetExtent? Is the double call to Wimp_OpenWindow
necessary?
--
Steve Fryatt - Leeds, England

http://www.stevefryatt.org.uk/
News
2019-03-06 23:27:51 UTC
Permalink
Post by Steve Fryatt
Can't you just call Wimp_OpenWindow to size and scroll the window
as required, then call Wimp_SetExtent? Is the double call to
Wimp_OpenWindow necessary?
Yes, you are right - I was overthinking it.
--
Chris Johnson
Loading...