Lisp HUG Maillist Archive

scrolling pane application

Hello,
    I have LW 4.1 Professional and set it aside for a few years... just now starting to see what I might do with it.
   A program I want to begin with will basically be a scrolling pane with some default text already inserted in it. Really, the default text will be some bolded section headers... and the user will insert text into the scrolling pane.... So the scrolling pane initiates with something like this:

Name:

Sec A:

Sec B:

Sec C: 

Sec D: 

Sec E: 

   For when the document gets long, I would like to have some buttons above the scrolling text pane, so that if a button was clicked on, you could "jump" (scroll to) the section of interest... for example a button "D" above the scrolling text pane, when clicked would scroll all the way down to the Sec D heading.
   I am hoping someone might be able to suggest something to help get me "jump started".
Thanks,
Rick


How to find graphical width of vertical scroll bar

How can I find the width, in pixels, of the width of the vertical scroll bar (or the height of a horizontal one)? Thanks.
 
Mitch

Re: How to find graphical width of vertical scroll bar

Mitch Berkson wrote:

> How can I find the width, in pixels, of the width of the vertical scroll bar
> (or the height of a horizontal one)? Thanks.

I don't know if there's a portable solution in CAPI, but on Windows you can use
WIN32:GET-SYSTEM-METRICS. See for example http://support.microsoft.com/kb/210603

Arthur


RE: How to find graphical width of vertical scroll bar

> How can I find the width, in pixels, of the width of the vertical 
> scroll bar (or the height of a horizontal one)? Thanks.

I think I have found a pretty good way to do this. 

capi:%width% is the width of the pane which is the sum of the
visible-pane-width, the border and the scroll bar width. Since I can find
capi:%width% and capi:simple-pane-visible-width for the pane of interest, I
can find the scroll bar width by subtracting the border width. I can find
the border width by looking at a pane without a scroll bar.

In my example, on XP, the borders are 2 each wide and the scroll bar is 12
wide.

Mitch


Updated at: 2020-12-10 08:46 UTC