• Hiding and revealing part of a window

    From Bob Latham@bob@sick-of-spam.invalid to comp.sys.acorn.programmer on Fri Jul 10 09:49:15 2026
    From Newsgroup: comp.sys.acorn.programmer

    Words of guidance would be appreciated - thanks.

    An application I'm writing has a secondary mode which for the most
    part I want hidden. When the special mode is enabled, the main window
    reveals the control panel for that mode.

    Don't mind if the reveal is to the side or below the main window.

    What is the easiest mechanism to achieve this?

    Otherwise, I may have to create another window for these controls but
    I'm not keen on that idea.


    Thanks.

    Bob.

    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From Martin@News04@avisoft.f9.co.uk to comp.sys.acorn.programmer on Fri Jul 10 10:06:58 2026
    From Newsgroup: comp.sys.acorn.programmer

    In article <5cf61ef6a3bob@sick-of-spam.invalid>,
    Bob Latham <bob@sick-of-spam.invalid> wrote:
    Words of guidance would be appreciated - thanks.

    An application I'm writing has a secondary mode which for the most
    part I want hidden. When the special mode is enabled, the main
    window reveals the control panel for that mode.

    How is the 'special mode' enabled?
    A button in the window, or some setting elsewhere?

    Don't mind if the reveal is to the side or below the main window.
    What is the easiest mechanism to achieve this?

    Just set up the full window as you want, with reveal to right or
    underneath, and just use the 'special setting' to determine the size
    of the visible window when you use Wimp_OpenWindow

    This perhaps assuming that there are no scroll bars enabled!
    --
    Martin Avison
    Note that unfortunately this email address will become invalid
    without notice if (when) any spam is received.
    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From Bob Latham@bob@sick-of-spam.invalid to comp.sys.acorn.programmer on Fri Jul 10 11:25:08 2026
    From Newsgroup: comp.sys.acorn.programmer

    In article <5cf62095ccNews04@avisoft.f9.co.uk>,
    Martin <News04@avisoft.f9.co.uk> wrote:
    In article <5cf61ef6a3bob@sick-of-spam.invalid>,
    Bob Latham <bob@sick-of-spam.invalid> wrote:
    Words of guidance would be appreciated - thanks.

    An application I'm writing has a secondary mode which for the most
    part I want hidden. When the special mode is enabled, the main
    window reveals the control panel for that mode.

    How is the 'special mode' enabled?
    A button in the window, or some setting elsewhere?

    At the moment it is simply a setting in the app's config file just to
    test the special mode algorithm but I will change that to either a
    menu item or a button in the window.

    Don't mind if the reveal is to the side or below the main window.
    What is the easiest mechanism to achieve this?

    Just set up the full window as you want, with reveal to right or
    underneath, and just use the 'special setting' to determine the size
    of the visible window when you use Wimp_OpenWindow

    Yes, I can see that, I could manage it too.

    This perhaps assuming that there are no scroll bars enabled!

    Unfortunately, they are enabled.

    I don't know what the best thing to do is... stumped.

    I may end up having a second window yet.


    Thanks.

    Bob.

    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From Kevin Wells@kev@kevsoft.co.uk to comp.sys.acorn.programmer on Fri Jul 10 16:37:50 2026
    From Newsgroup: comp.sys.acorn.programmer

    In message <5cf61ef6a3bob@sick-of-spam.invalid>
    Bob Latham <bob@sick-of-spam.invalid> wrote:

    Words of guidance would be appreciated - thanks.

    An application I'm writing has a secondary mode which for the most
    part I want hidden. When the special mode is enabled, the main window
    reveals the control panel for that mode.

    Don't mind if the reveal is to the side or below the main window.

    What is the easiest mechanism to achieve this?

    Would the easiest option is to have 2 versions of the window, one with
    the basic options and one with the full options, just close the one you
    don't want amd open the other one in it's place?

    Otherwise, I may have to create another window for these controls but
    I'm not keen on that idea.


    Thanks.

    Bob.

    --
    Kev Wells
    https://kevsoft.co.uk/ https://ko-fi.com/kevsoft
    carpe cervisium
    Feeling stupid I know I am.
    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From Bob Latham@bob@sick-of-spam.invalid to comp.sys.acorn.programmer on Fri Jul 10 20:08:01 2026
    From Newsgroup: comp.sys.acorn.programmer

    In article <8f5e44f65c.Kevin@Kevsoft>,

    Would the easiest option is to have 2 versions of the window, one
    with the basic options and one with the full options, just close
    the one you don't want amd open the other one in it's place?

    That's a sneaky idea I do admit. The only issue I can see with that
    is I'd have two window handles wouldn't I?

    Thanks.

    Bob.

    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From J Peachey@john@jpeachey.co.uk to comp.sys.acorn.programmer on Fri Jul 10 21:15:02 2026
    From Newsgroup: comp.sys.acorn.programmer

    In message <5cf61ef6a3bob@sick-of-spam.invalid>
    Bob Latham <bob@sick-of-spam.invalid> wrote:

    Words of guidance would be appreciated - thanks.

    An application I'm writing has a secondary mode which for the most
    part I want hidden. When the special mode is enabled, the main window
    reveals the control panel for that mode.

    Don't mind if the reveal is to the side or below the main window.

    What is the easiest mechanism to achieve this?

    Otherwise, I may have to create another window for these controls but
    I'm not keen on that idea.


    Thanks.

    Bob.

    Hi,

    How are you implementing your basic control, is it a pane or separate
    window.

    I did wonder whether you could create your basic, and advanced controls as individual panes, which you could open and close as needed.

    The other way I could see it being done is design a window the maximum
    size for all the controls - then resize it to hide the advanced controls, then resize to reveal the other controls.

    Final thought is have all the controls on screen with them greyed out -
    this might be the simplest option

    John
    --
    _________________________________________
    | University of Glos. Blighting Longlevens.
    | mailto:john@jpeachey.co.uk
    _______________________| http://www.jpeachey.co.uk
    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From Steve Fryatt@news@stevefryatt.org.uk to comp.sys.acorn.programmer on Fri Jul 10 22:19:56 2026
    From Newsgroup: comp.sys.acorn.programmer

    On 10 Jul, Bob Latham wrote in message
    <5cf627bdb6bob@sick-of-spam.invalid>:

    I don't know what the best thing to do is... stumped.

    Wimp_SetExtent is your frind in this case. Adjust the data block for Wimp_OpenWindow (including the scroll offsets), call Wimp_OpenWindow, then
    call Wimp_SetExtent. Make sure that you don't set the extent to less than
    you have asked to be visible through Wimp_OpenWindow.

    I know you're a BASIC and Assembler person, but I don't think that any of my BASIC programs use variable sized windows. However, if you can read enough C
    to be able to work out the parameters (it's all OSLib, so all of the Wimp
    block entries are named sensibly), you can see how Puzzles adjusts its index window extent here:

    https://github.com/steve-fryatt/puzzles/blob/3308390778ca2fdd37ca4057311c8b97bc20a101/src/index_window.c#L826-L853
    --
    Steve Fryatt - Leeds, England

    http://www.stevefryatt.org.uk/
    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From Bob Latham@bob@sick-of-spam.invalid to comp.sys.acorn.programmer on Sat Jul 11 10:11:24 2026
    From Newsgroup: comp.sys.acorn.programmer

    In article <340763f65c.john@user.orpheusmail.co.uk>,
    J Peachey <john@jpeachey.co.uk> wrote:

    How are you implementing your basic control, is it a pane or
    separate window.

    At the moment I only have 1 window actively involved. I've never
    tried to use a pane.

    I did wonder whether you could create your basic, and advanced
    controls as individual panes, which you could open and close as
    needed.

    It sounds good but I can't imagine it. Can you hide a pane?

    The other way I could see it being done is design a window the
    maximum size for all the controls - then resize it to hide the
    advanced controls, then resize to reveal the other controls.

    Final thought is have all the controls on screen with them greyed
    out - this might be the simplest option

    Yes indeed, you may be right. :-)

    Thanks.

    Bob.

    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From Bob Latham@bob@sick-of-spam.invalid to comp.sys.acorn.programmer on Sat Jul 11 10:32:10 2026
    From Newsgroup: comp.sys.acorn.programmer

    In article <mpro.thz9x000u4xlm03ow.news@stevefryatt.org.uk>,
    Steve Fryatt <news@stevefryatt.org.uk> wrote:

    Wimp_SetExtent is your frind in this case. Adjust the data block
    for Wimp_OpenWindow (including the scroll offsets), call
    Wimp_OpenWindow, then call Wimp_SetExtent. Make sure that you don't
    set the extent to less than you have asked to be visible through Wimp_OpenWindow.

    Oh that's interesting, I obviously need to read up about that.

    I know you're a BASIC and Assembler person,

    Almost all assembler but yes, I wish I wasn't if I'm honest, I feel
    the constant need to apologise for it. Although I've purchased the
    ROOL Dev suite I can't get into it. At work in the 90s I did a week
    long C course and remember a lot of it and I was fine with a recent
    Arduino project.

    I think part of the problem is that unlike other languages and
    systems, I've never seen a *very* simple wimp application created in
    bits using the ROOL kit, so I have no starter examples.

    but I don't think that any of my BASIC programs use variable sized
    windows. However, if you can read enough C to be able to work out
    the parameters (it's all OSLib, so all of the Wimp block entries
    are named sensibly), you can see how Puzzles adjusts its index
    window extent here:

    https://github.com/steve-fryatt/puzzles/blob/3308390778ca2fdd37ca4057311c8b97bc20a101/src/index_window.c#L826-L853

    I'll try. You gave similar advice last year about scrolling text in a
    window. I couldn't understand the code but you did point me in the
    right direction and I was then able to succeed. Trusty, very dated
    PRMs.

    The text scrolling is great BTW. - Thanks so much.

    Cheers,

    Bob.

    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From Steve Fryatt@news@stevefryatt.org.uk to comp.sys.acorn.programmer on Sat Jul 11 16:33:20 2026
    From Newsgroup: comp.sys.acorn.programmer

    On 11 Jul, Bob Latham wrote in message
    <5cf6a6ba64bob@sick-of-spam.invalid>:

    In article <mpro.thz9x000u4xlm03ow.news@stevefryatt.org.uk>,
    Steve Fryatt <news@stevefryatt.org.uk> wrote:

    I know you're a BASIC and Assembler person,

    Almost all assembler but yes, I wish I wasn't if I'm honest, I feel the constant need to apologise for it.

    It was more an apology from my side that I didn't have a non-C example to
    hand.

    I think part of the problem is that unlike other languages and systems,
    I've never seen a *very* simple wimp application created in bits using the ROOL kit, so I have no starter examples.

    I'm not suggesting that you read it (although if it's useful, that's great), but I should probably mention this guide. It starts with a very simple BASIC example in Chapter 1, then converts it to C in Chapter 2 and goes on from there. The target audience was people who knew C, had maybe written Wimp applications in BASIC, but hadn't used C for the Wimp.

    It's now got to 35 chapters (and still hasn't yet got to Wimp_SetExtent)...

    https://www.stevefryatt.org.uk/risc-os/wimp-prog

    You'll need a "recent-ish" version of the DDE, though.

    [snip]

    I'll try. You gave similar advice last year about scrolling text in a
    window. I couldn't understand the code but you did point me in the right direction and I was then able to succeed. Trusty, very dated PRMs.

    I've just searched for Wimp_SetExtent in my project folders on the
    off-chance, and it's pointed me to this:

    https://www.stevefryatt.org.uk/risc-os/panes/moving-the-furniture

    which is a sort-of sibling to the tutorial above (there's other references
    in the following chapter, too). It's about panes, but it does show Wimp_SetExtent in use in BASIC -- the pane tutorial is all in BASIC for accessibility.

    Unfortunately, I couldn't find any applications of mine in BASIC which use Wimp_SetExtent and that I'd consider a good example to suggest looking at
    (it's all code that I wrote in the 1990s, before I had any idea what I was doing -- if I even do now...).

    :-)
    --
    Steve Fryatt - Leeds, England

    http://www.stevefryatt.org.uk/
    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From Bob Latham@bob@sick-of-spam.invalid to comp.sys.acorn.programmer on Sat Jul 11 20:41:14 2026
    From Newsgroup: comp.sys.acorn.programmer

    In article <mpro.ti0ojf0184uq504z4.news@stevefryatt.org.uk>,
    Steve Fryatt <news@stevefryatt.org.uk> wrote:
    On 11 Jul, Bob Latham wrote in message
    <5cf6a6ba64bob@sick-of-spam.invalid>:

    In article <mpro.thz9x000u4xlm03ow.news@stevefryatt.org.uk>,
    Steve Fryatt <news@stevefryatt.org.uk> wrote:


    I'm not suggesting that you read it (although if it's useful,
    that's great), but I should probably mention this guide. It starts
    with a very simple BASIC example in Chapter 1, then converts it to
    C in Chapter 2 and goes on from there. The target audience was
    people who knew C, had maybe written Wimp applications in BASIC,
    but hadn't used C for the Wimp.

    It's now got to 35 chapters (and still hasn't yet got to
    Wimp_SetExtent)...

    https://www.stevefryatt.org.uk/risc-os/wimp-prog

    You'll need a "recent-ish" version of the DDE, though.

    Yes, I really should stop making excuses, step out of my comfort zone
    and get in there and that looks like a good start - thanks.

    I will get further with my project first though, I've been on it 11
    months now and with the new LanManFS coming I need to be ready.

    Imagine, being able to easily connect to any NAS, be able to see the
    full unicode and not have to fight Sunfish to do it !! :-)

    I've just searched for Wimp_SetExtent in my project folders on the off-chance, and it's pointed me to this:

    https://www.stevefryatt.org.uk/risc-os/panes/moving-the-furniture

    which is a sort-of sibling to the tutorial above (there's other
    references in the following chapter, too). It's about panes, but it
    does show Wimp_SetExtent in use in BASIC -- the pane tutorial is
    all in BASIC for accessibility.

    Unfortunately, I couldn't find any applications of mine in BASIC
    which use Wimp_SetExtent and that I'd consider a good example to
    suggest looking at (it's all code that I wrote in the 1990s, before
    I had any idea what I was doing -- if I even do now...).

    Ha, try being me for an hour, You would be sure then. :-)

    Thanks.

    Bob.

    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From Harriet Bazley@harriet@bazleyfamily.co.uk to comp.sys.acorn.programmer on Sun Jul 12 12:12:33 2026
    From Newsgroup: comp.sys.acorn.programmer

    On 10 Jul 2026 as I do recall,
    Bob Latham wrote:

    In article <8f5e44f65c.Kevin@Kevsoft>,

    Would the easiest option is to have 2 versions of the window, one
    with the basic options and one with the full options, just close
    the one you don't want amd open the other one in it's place?

    That's a sneaky idea I do admit. The only issue I can see with that
    is I'd have two window handles wouldn't I?

    Have a 'current' window handle in a variable, and set its value to
    either of the two versions according to which one you currently want
    your application to be using?
    (Or use an array(handle%, version%) and adjust the value of version%,
    but that would probably be harder to edit in to your existing program
    and more difficult to read thereafter....)
    --
    Harriet Bazley == Loyaulte me lie ==

    A thing is not necessarily true because a man dies for it.
    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From Bob Latham@bob@sick-of-spam.invalid to comp.sys.acorn.programmer on Sun Jul 12 13:45:38 2026
    From Newsgroup: comp.sys.acorn.programmer

    In article <14c133f75c.harriet@bazleyfamily.co.uk>,
    Harriet Bazley <harriet@bazleyfamily.co.uk> wrote:
    On 10 Jul 2026 as I do recall,
    Bob Latham wrote:

    In article <8f5e44f65c.Kevin@Kevsoft>,

    Would the easiest option is to have 2 versions of the window,
    one with the basic options and one with the full options, just
    close the one you don't want amd open the other one in it's
    place?

    That's a sneaky idea I do admit. The only issue I can see with
    that is I'd have two window handles wouldn't I?

    Have a 'current' window handle in a variable, and set its value to
    either of the two versions according to which one you currently
    want your application to be using? (Or use an array(handle%,
    version%) and adjust the value of version%, but that would probably
    be harder to edit in to your existing program and more difficult to
    read thereafter....)

    So at the point of swap over, I close one window, open the other in
    same position hopefully and change the current window handle, is that
    about it?

    Not sure how fixed and embedded the window handle is in my code, I'll
    need to have a look. It is an excellent cheat, though maybe best done
    towards the end of the project to prevent duplication of work on the
    window.

    Thanks.

    Bob.

    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From Kevin Wells@kev@kevsoft.co.uk to comp.sys.acorn.programmer on Sun Jul 12 21:03:44 2026
    From Newsgroup: comp.sys.acorn.programmer

    In message <5cf6579ccbbob@sick-of-spam.invalid>
    Bob Latham <bob@sick-of-spam.invalid> wrote:

    In article <8f5e44f65c.Kevin@Kevsoft>,

    Would the easiest option is to have 2 versions of the window, one
    with the basic options and one with the full options, just close
    the one you don't want amd open the other one in it's place?

    That's a sneaky idea I do admit. The only issue I can see with that
    is I'd have two window handles wouldn't I?

    Thanks.

    You could have 3 window handles, one say called main%, main1% and main2.

    main% would always point to the one in use.
    Bob.

    --
    Kev Wells
    https://kevsoft.co.uk/ https://ko-fi.com/kevsoft
    carpe cervisium http://worldticketshop.cleafs.com/go?k=TWKNy827tFspChxaFRbKe-OqVi3uXIyc MotoGP --- Synchronet 3.22a-Linux NewsLink 1.2
  • From Harriet Bazley@harriet@bazleyfamily.co.uk to comp.sys.acorn.programmer on Sun Jul 12 23:19:14 2026
    From Newsgroup: comp.sys.acorn.programmer

    On 12 Jul 2026 as I do recall,
    Bob Latham wrote:

    In article <14c133f75c.harriet@bazleyfamily.co.uk>,
    Harriet Bazley <harriet@bazleyfamily.co.uk> wrote:
    On 10 Jul 2026 as I do recall,
    Bob Latham wrote:

    [snip]

    I'd have two window handles wouldn't I?

    Have a 'current' window handle in a variable, and set its value to
    either of the two versions according to which one you currently
    want your application to be using? (Or use an array(handle%,
    version%) and adjust the value of version%, but that would probably
    be harder to edit in to your existing program and more difficult to
    read thereafter....)

    So at the point of swap over, I close one window, open the other in
    same position hopefully and change the current window handle, is that
    about it?

    Yes - and make sure that any sections of the window that are common to
    both views have the same icon handles, etc. (i.e. if you have code
    triggered by a click on icon 3 in that window, make sure both versions
    have that icon as icon 3 and that any extra sections in the 'other'
    window use a different range of icon numbers!)


    Not sure how fixed and embedded the window handle is in my code, I'll
    need to have a look.

    I think you said you were writing in assembler, so if it is a value
    currently being hardwired into the finished code than that would be more
    of a problem. You would need to reserve an area of memory to store it
    in and then poke the new value into that area when you want to change
    windows. And always load the value of the window handle afresh from that
    memory location before actually using it - the same as I had to do when
    using the SlidingHeap module.
    --
    Harriet Bazley == Loyaulte me lie ==

    We are not punished for our sins, but by them.
    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From druck@news@druck.org.uk to comp.sys.acorn.programmer on Wed Jul 15 17:39:01 2026
    From Newsgroup: comp.sys.acorn.programmer

    On 10/07/2026 22:19, Steve Fryatt wrote:
    On 10 Jul, Bob Latham wrote in message
    <5cf627bdb6bob@sick-of-spam.invalid>:

    I don't know what the best thing to do is... stumped.

    Wimp_SetExtent is your frind in this case. Adjust the data block for Wimp_OpenWindow (including the scroll offsets), call Wimp_OpenWindow, then call Wimp_SetExtent. Make sure that you don't set the extent to less than
    you have asked to be visible through Wimp_OpenWindow.

    This is the solution I used for the DiscKnight choices window when the advanced options button is pressed. It's easier than messing around with
    two different windows. Works for Toolbox apps too.

    ---druck
    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From Steve Fryatt@news@stevefryatt.org.uk to comp.sys.acorn.programmer on Wed Jul 15 20:24:09 2026
    From Newsgroup: comp.sys.acorn.programmer

    On 15 Jul, druck wrote in message
    <1138d3k$1a5i3$1@druck.eternal-september.org>:

    It's easier than messing around with two different windows.

    It is. Very much so. :-)
    --
    Steve Fryatt - Leeds, England

    http://www.stevefryatt.org.uk/
    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From Steve Fryatt@news@stevefryatt.org.uk to comp.sys.acorn.programmer on Wed Jul 15 20:26:30 2026
    From Newsgroup: comp.sys.acorn.programmer

    On 12 Jul, Kevin Wells wrote in message
    <cd6264f75c.Kevin@Kevsoft>:

    In message <5cf6579ccbbob@sick-of-spam.invalid>
    Bob Latham <bob@sick-of-spam.invalid> wrote:

    I'd have two window handles wouldn't I?

    You could have 3 window handles, one say called main%, main1% and main2.

    main% would always point to the one in use.

    Wouldn't that be 2 window handles: main1% and main2%? The main% variable
    would then be a copy of the value of whichever one was in use?

    Use Wimp_SetExtent and have one window... it's a *lot* less messy and confusing.

    :-)
    --
    Steve Fryatt - Leeds, England

    http://www.stevefryatt.org.uk/
    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From Bob Latham@bob@sick-of-spam.invalid to comp.sys.acorn.programmer on Thu Jul 16 11:05:39 2026
    From Newsgroup: comp.sys.acorn.programmer

    In article <mpro.thz9x000u4xlm03ow.news@stevefryatt.org.uk>,
    Steve Fryatt <news@stevefryatt.org.uk> wrote:
    On 10 Jul, Bob Latham wrote in message
    <5cf627bdb6bob@sick-of-spam.invalid>:

    My extra panel is at the bottom of the window. So I assume this is
    the minimum y settings.

    So I create a window in WinEd that contains all elements including
    the icons at the bottom which are usually hidden.

    Okay done that.

    Adjust the data block for Wimp_OpenWindow (including the scroll
    offsets),

    Adjust which parameters? What am I trying to achieve doing this?

    call Wimp_OpenWindow,

    Okay.

    then call Wimp_SetExtent.

    To do what?
    What am I trying to achieve doing this?


    Sorry to be thick but I can't understand the principle of what you're
    telling me to do. I need to understand before I can code something.


    Thanks.

    Bob.

    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From Martin@News04@avisoft.f9.co.uk to comp.sys.acorn.programmer on Thu Jul 16 12:04:18 2026
    From Newsgroup: comp.sys.acorn.programmer

    In article <5cf93cf94dbob@sick-of-spam.invalid>,
    Bob Latham <bob@sick-of-spam.invalid> wrote:
    In article <mpro.thz9x000u4xlm03ow.news@stevefryatt.org.uk>,
    Steve Fryatt <news@stevefryatt.org.uk> wrote:
    On 10 Jul, Bob Latham wrote in message
    <5cf627bdb6bob@sick-of-spam.invalid>:

    My extra panel is at the bottom of the window. So I assume this is
    the minimum y settings.

    So I create a window in WinEd that contains all elements including
    the icons at the bottom which are usually hidden.

    Okay done that.

    Adjust the data block for Wimp_OpenWindow (including the scroll
    offsets),

    Adjust which parameters? What am I trying to achieve doing this?

    call Wimp_OpenWindow,

    Okay.

    then call Wimp_SetExtent.

    To do what?
    What am I trying to achieve doing this?


    Sorry to be thick but I can't understand the principle of what
    you're telling me to do. I need to understand before I can code
    something.

    I am confused as well! If you have a fixed main window area, but
    sometimes you want to display another fixed area at the bottom of it,
    then I would think you need to alter the Visible Area displayed, not
    the Work Area (which Wimp_SetExtent does).

    Create a window with two icons in WinEd, vertically spaced.
    Then Menu => Work Area => Minimise & Update you will see the work
    area X1 & Y1 shrink, and the scroll bars on the new window expand to
    fill the bar.
    But the DISPLAYED window does not change - you still see the two
    icons.
    If you now use Menu => Visible Area and reduce the Height by 50%,
    when you click on Move the visible window will halve in height, and
    you will probably only be able to see the top icon.

    Change the Visible height back to the original, and you will see both
    icons again.

    The change in Visible Area is done with a Wimp_GetWindowState, then
    change just the visible min Y value and nothing else, then issue an Wimp_OpenWindow.

    However, if the main part of the window is of variable height, and/or
    you need the scroll bars, then this simple way will not work, as the
    extra bottom icons will need to move to the bottom of the window if
    the top part changes size.
    --
    Martin Avison
    Note that unfortunately this email address will become invalid
    without notice if (when) any spam is received.
    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From Bob Latham@bob@sick-of-spam.invalid to comp.sys.acorn.programmer on Thu Jul 16 12:48:08 2026
    From Newsgroup: comp.sys.acorn.programmer

    In article <5cf94257c7News04@avisoft.f9.co.uk>,
    Martin <News04@avisoft.f9.co.uk> wrote:
    In article <5cf93cf94dbob@sick-of-spam.invalid>,
    Bob Latham <bob@sick-of-spam.invalid> wrote:
    In article <mpro.thz9x000u4xlm03ow.news@stevefryatt.org.uk>,
    Steve Fryatt <news@stevefryatt.org.uk> wrote:
    On 10 Jul, Bob Latham wrote in message
    <5cf627bdb6bob@sick-of-spam.invalid>:


    Sorry to be thick but I can't understand the principle of what
    you're telling me to do. I need to understand before I can code
    something.

    I am confused as well!

    Thank heavens for that, if you don't grasp it ..

    If you have a fixed main window area, but
    sometimes you want to display another fixed area at the bottom of
    it, then I would think you need to alter the Visible Area
    displayed, not the Work Area (which Wimp_SetExtent does).

    That makes sense to me, I understand that.

    Surely, if you reduce the Extent then you reduce the work area and
    therefore remove from the window definition all the items in the area
    you've chopped.

    [Snip]

    The change in Visible Area is done with a Wimp_GetWindowState, then
    change just the visible min Y value and nothing else, then issue an Wimp_OpenWindow.

    Yes, I understand that too.

    However, if the main part of the window is of variable height,
    and/or you need the scroll bars, then this simple way will not
    work, as the extra bottom icons will need to move to the bottom of
    the window if the top part changes size.

    Brain just exploded again. I can't understand that.

    I think the problem is that the vertical scroll bar will be able, at
    any time to reveal the hidden bottom section. I also think that
    changing the extent is designed to fix that issue but I don't
    understand exactly how.

    Thanks.

    Bob.

    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From Martin@News04@avisoft.f9.co.uk to comp.sys.acorn.programmer on Thu Jul 16 13:26:49 2026
    From Newsgroup: comp.sys.acorn.programmer

    In article <5cf9465afdbob@sick-of-spam.invalid>,
    Bob Latham <bob@sick-of-spam.invalid> wrote:
    In article <5cf94257c7News04@avisoft.f9.co.uk>,
    Martin <News04@avisoft.f9.co.uk> wrote:
    In article <5cf93cf94dbob@sick-of-spam.invalid>,
    Bob Latham <bob@sick-of-spam.invalid> wrote:

    If you have a fixed main window area, but sometimes you want to
    display another fixed area at the bottom of it, then I would
    think you need to alter the Visible Area displayed, not the Work
    Area (which Wimp_SetExtent does).

    That makes sense to me, I understand that.

    Surely, if you reduce the Extent then you reduce the work area and
    therefore remove from the window definition all the items in the
    area you've chopped.

    Changing the Visible area does not affect the Work area.

    Changing the Work area does not remove icons from the window
    definition (though can affect the visible area, which must be in the
    work area).

    Changing either can result in icons becoming invisible, if they are
    outside Visible or Work areas.

    The only connection between Visible and Work areas are the Scroll
    Offsets (which can make the brain hurt!) which determine which part
    of the Work Area is Visible.

    Enlarging Visible or Work areas can result in them becoming visible
    again.

    [Snip]

    The change in Visible Area is done with a Wimp_GetWindowState,
    then change just the visible min Y value and nothing else, then
    issue an Wimp_OpenWindow.

    Yes, I understand that too.

    However, if the main part of the window is of variable height,
    and/or you need the scroll bars, then this simple way will not
    work, as the extra bottom icons will need to move to the bottom of
    the window if the top part changes size.

    Brain just exploded again. I can't understand that.

    I think the problem is that the vertical scroll bar will be able, at
    any time to reveal the hidden bottom section. I also think that
    changing the extent is designed to fix that issue but I don't
    understand exactly how.

    If the main part of the window is fixed size, and small enough to
    display on the screen, why do you need scrollbars?

    If you REALLY need scrollbars for the main part of the window, it
    does become more complex.
    --
    Martin Avison
    Note that unfortunately this email address will become invalid
    without notice if (when) any spam is received.
    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From Harriet Bazley@harriet@bazleyfamily.co.uk to comp.sys.acorn.programmer on Thu Jul 16 14:26:25 2026
    From Newsgroup: comp.sys.acorn.programmer

    On 16 Jul 2026 as I do recall,
    Bob Latham wrote:

    [snip]

    I think the problem is that the vertical scroll bar will be able, at
    any time to reveal the hidden bottom section. I also think that
    changing the extent is designed to fix that issue but I don't
    understand exactly how.


    In theory, if you change the maximum size of the window work area then
    the scrollbars can no longer scroll beyond that. (And since it's
    possible for icons to be located outside the edge of the window - no
    sanity checks! - changing it back should reveal the icons down at the
    bottom again, in the position in which they were originally created.)

    I haven't tested this....
    --
    Harriet Bazley == Loyaulte me lie ==

    A chicken is an egg's way of producing more eggs.
    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From Bob Latham@bob@sick-of-spam.invalid to comp.sys.acorn.programmer on Thu Jul 16 14:50:39 2026
    From Newsgroup: comp.sys.acorn.programmer

    In article <815a4ff95c.harriet@bazleyfamily.co.uk>,
    Harriet Bazley <harriet@bazleyfamily.co.uk> wrote:
    On 16 Jul 2026 as I do recall,
    Bob Latham wrote:

    In theory, if you change the maximum size of the window work area
    then the scrollbars can no longer scroll beyond that. (And since
    it's possible for icons to be located outside the edge of the
    window - no sanity checks! - changing it back should reveal the
    icons down at the bottom again, in the position in which they were
    originally created.)

    Yes, I hope so, working at it right now...


    I haven't tested this....

    Nor me - YET.

    Thanks.

    Bob.

    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From Jean-Michel@jmc.bruck@orange.fr to comp.sys.acorn.programmer on Thu Jul 16 17:45:45 2026
    From Newsgroup: comp.sys.acorn.programmer

    In message <5cf93cf94dbob@sick-of-spam.invalid>
    Bob Latham <bob@sick-of-spam.invalid> wrote:

    In article <mpro.thz9x000u4xlm03ow.news@stevefryatt.org.uk>,
    Steve Fryatt <news@stevefryatt.org.uk> wrote:
    On 10 Jul, Bob Latham wrote in message
    <5cf627bdb6bob@sick-of-spam.invalid>:

    My extra panel is at the bottom of the window. So I assume this is
    the minimum y settings.

    So I create a window in WinEd that contains all elements including
    the icons at the bottom which are usually hidden.

    Okay done that.
    Is it a window with an internal toolbar?


    Adjust the data block for Wimp_OpenWindow (including the scroll
    offsets),

    Adjust which parameters? What am I trying to achieve doing this?

    call Wimp_OpenWindow,

    Okay.

    then call Wimp_SetExtent.

    To do what?
    What am I trying to achieve doing this?


    Sorry to be thick but I can't understand the principle of what you're
    telling me to do. I need to understand before I can code something.


    Thanks.

    Bob.
    --
    Jean-Michel
    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From Bob Latham@bob@sick-of-spam.invalid to comp.sys.acorn.programmer on Thu Jul 16 16:58:44 2026
    From Newsgroup: comp.sys.acorn.programmer

    In article <221c5cf95c.jmb@jmc.bruck.orange.fr>,
    Jean-Michel <jmc.bruck@orange.fr> wrote:

    Is it a window with an internal toolbar?

    Not really. It's just a window with icons. Some of those icons at the
    bottom of the screen I would like to hide unless they're needed.

    Thanks.

    Bob.

    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From Kevin Wells@kev@kevsoft.co.uk to comp.sys.acorn.programmer on Fri Jul 17 21:06:22 2026
    From Newsgroup: comp.sys.acorn.programmer

    In message <mpro.ti8e0100sqjvl0c0y.news@stevefryatt.org.uk>
    Steve Fryatt <news@stevefryatt.org.uk> wrote:

    On 12 Jul, Kevin Wells wrote in message
    <cd6264f75c.Kevin@Kevsoft>:

    In message <5cf6579ccbbob@sick-of-spam.invalid>
    Bob Latham <bob@sick-of-spam.invalid> wrote:

    I'd have two window handles wouldn't I?

    You could have 3 window handles, one say called main%, main1% and main2.

    main% would always point to the one in use.

    Wouldn't that be 2 window handles: main1% and main2%? The main% variable >would then be a copy of the value of whichever one was in use?

    Yes

    Use Wimp_SetExtent and have one window... it's a *lot* less messy and >confusing.

    :-)

    --
    Kev Wells
    https://kevsoft.co.uk/ https://ko-fi.com/kevsoft
    carpe cervisium
    So many beers so little time.
    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From Bob Latham@bob@sick-of-spam.invalid to comp.sys.acorn.programmer on Sat Jul 18 17:27:36 2026
    From Newsgroup: comp.sys.acorn.programmer

    In article <815a4ff95c.harriet@bazleyfamily.co.uk>,
    Harriet Bazley <harriet@bazleyfamily.co.uk> wrote:
    On 16 Jul 2026 as I do recall,
    Bob Latham wrote:

    [snip]

    I think the problem is that the vertical scroll bar will be able,
    at any time to reveal the hidden bottom section. I also think
    that changing the extent is designed to fix that issue but I
    don't understand exactly how.


    In theory, if you change the maximum size of the window work area
    then the scrollbars can no longer scroll beyond that. (And since
    it's possible for icons to be located outside the edge of the
    window - no sanity checks! - changing it back should reveal the
    icons down at the bottom again, in the position in which they were
    originally created.)

    I haven't tested this....

    I've got it working !!!

    I've modified my Wimp_OpenWindow code to reduce the window height by
    increasing the value of the minimum Y visible area. That raised the
    bottom of the window as expected but the scroll bars can pull it back.

    Next I used Wimp_SetExtent to remove that bottom area. That removes
    the scroll bar recovery option.

    In both cases I used the same variable which if set to 130 chops that
    off the bottom but if set to zero it leaves the window full size.

    Of course to make the window full size again the process needs to be
    reversed so set the extent first and then re-open the window.

    All exactly as Steve suggested and it worked.

    I had always thought items outside the work area would be lost but
    actually, not so.

    Thanks to everyone who helped.

    Not at all sure what to do about the scroll bar...


    Cheers,

    Bob.

    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From Martin@News04@avisoft.f9.co.uk to comp.sys.acorn.programmer on Sat Jul 18 22:10:18 2026
    From Newsgroup: comp.sys.acorn.programmer

    In article <5cfa679cf3bob@sick-of-spam.invalid>,
    Bob Latham <bob@sick-of-spam.invalid> wrote:
    Not at all sure what to do about the scroll bar...

    Why do you need the scroll bar?
    Is the main window height larger than can be displayed on the screen
    easily?

    If not, just remove the scroll bar.
    Then you would not need to mess about with SetExtent.
    --
    Martin Avison
    Note that unfortunately this email address will become invalid
    without notice if (when) any spam is received.
    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From Bob Latham@bob@sick-of-spam.invalid to comp.sys.acorn.programmer on Sun Jul 19 09:20:05 2026
    From Newsgroup: comp.sys.acorn.programmer

    In article <5cfa817ebeNews04@avisoft.f9.co.uk>,
    Martin <News04@avisoft.f9.co.uk> wrote:
    In article <5cfa679cf3bob@sick-of-spam.invalid>,

    Why do you need the scroll bar?
    Is the main window height larger than can be displayed on the screen
    easily?

    If not, just remove the scroll bar.
    Then you would not need to mess about with SetExtent.

    A valid point for sure.

    It's not a glaring issue so I'll leave it for now, come back to it
    later and have a think.

    Cheers,

    Bob.

    --- Synchronet 3.22a-Linux NewsLink 1.2