🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.windows.interviews
Article #1281

Re: Minor problem with scrollbar

#1281
From: John Carlson
Date: Wed, 18 Nov 1992 00:34
31 lines
1788 bytes
In article <prestonm.721474069@cs.man.ac.uk> prestonm@cs.man.ac.uk (Martin Preston) writes:
>This is probably an obvious question, but does anyone know how to create a
>vscroll_bar where the sliding box starts at the top (i.e., an inverted
>scroller to the default one)?

Try this:

In dimension Y, have "Adjustable"::upper return 0.  If the glyph is
allocated and the requirement in dimension Y is less than the allocation's
allotment's span, have "Adjustable"::lower in dimension Y return the
negative of the allocation's allotment's span.  Otherwise, return
the negative of the requirement's natural in dimension Y.

Coord Adj_Glyph::lower(DimensionName dimension) const
{
        if (dimension == Dimension_X) {
                return 0;
        } else if (dimension == Dimension_Y) {
                Requisition r;
                request(r);
                if (allocated && r.requirement(dimension).natural() <
                        allocation().allotment(dimension).span()) {
                        return -allocation().allotment(dimension).span();
                } else {
                        return -r.requirement(dimension).natural();
                }
        }
}

John Carlson
carlson@yottzumm.tis.llnl.gov
Technical Details
Message-ID: <141798@lll-winken.LLNL.GOV>
Path: arc1-ca.pugleaf.net!sparky!uunet!charon.amdahl.com!pacbell.com!iggy.GW.Vitalink.COM!lll-winken!yottzumm.tis.llnl.gov!carlson
References: <prestonm.721474069@cs.man.ac.uk>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!sparky!uunet!charon.amdahl.com!pacbell.com!iggy.GW.Vitalink.COM!lll-winken!yottzumm.tis.llnl.gov!carlson
From: carlson@yottzumm.tis.llnl.gov (John Carlson)
Newsgroups: comp.windows.interviews
Subject: Re: Minor problem with scrollbar
Keywords: scrollbars
Message-ID: <141798@lll-winken.LLNL.GOV>
Date: 18 Nov 92 00:34:24 GMT
References: <prestonm.721474069@cs.man.ac.uk>
Sender: usenet@lll-winken.LLNL.GOV
Organization: Lawrence Livermore National Laboratory
Lines: 31
Nntp-Posting-Host: yottzumm.tis.llnl.gov