Sybase NNTP forums - End Of Life (EOL)

The NNTP forums from Sybase - forums.sybase.com - are now closed.

All new questions should be directed to the appropriate forum at the SAP Community Network (SCN).

Individual products have links to the respective forums on SCN, or you can go to SCN and search for your product in the search box (upper right corner) to find your specific developer center.

How to tell if scrollbars are visible or not

5 posts in DataWindow Last posting was on 2008-06-22 23:31:13.0Z
Jaspreet Posted on 2008-06-19 18:51:13.0Z
Sender: 726c.485aa9dd.1804289383@sybase.com
From: Jaspreet
Newsgroups: sybase.public.powerbuilder.datawindow
Subject: How to tell if scrollbars are visible or not
X-Mailer: WebNews to Mail Gateway v1.1t
Message-ID: <485aaaa1.728e.1681692777@sybase.com>
NNTP-Posting-Host: 10.22.241.41
X-Original-NNTP-Posting-Host: 10.22.241.41
Date: 19 Jun 2008 11:51:13 -0700
X-Trace: forums-1-dub 1213901473 10.22.241.41 (19 Jun 2008 11:51:13 -0700)
X-Original-Trace: 19 Jun 2008 11:51:13 -0700, 10.22.241.41
Lines: 6
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.datawindow:87216
Article PK: 416473

Hi,

Is there a way to find out from code if the horizontal
and/or vertical scrollbar is visible on the datawindow?

Thanks.


Alex Whitney Posted on 2008-06-19 21:15:10.0Z
From: "Alex Whitney" <alexw55@pdq.net>
Newsgroups: sybase.public.powerbuilder.datawindow
References: <485aaaa1.728e.1681692777@sybase.com>
Subject: Re: How to tell if scrollbars are visible or not
Lines: 35
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.2180
X-RFC2646: Format=Flowed; Original
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180
NNTP-Posting-Host: vip152.sybase.com
X-Original-NNTP-Posting-Host: vip152.sybase.com
Message-ID: <485acc5e$1@forums-1-dub>
Date: 19 Jun 2008 14:15:10 -0700
X-Trace: forums-1-dub 1213910110 10.22.241.152 (19 Jun 2008 14:15:10 -0700)
X-Original-Trace: 19 Jun 2008 14:15:10 -0700, vip152.sybase.com
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.datawindow:87221
Article PK: 416476

Horizontal I'm not sure about but I pretty sure that if its enabled and
there are objects on the datawindow object that extend past the right edge
then the bar will display. You would have to iterate through all of the
objects on the datawindow and determine if the (x + width) of the object is
> width of the control


Vertical will show if there are more rows than can be displayed and the bar
is enabled. So see if 'lastrowonpage' is less than the number of rows in the
datawindow and that firstrowonpage is = 1 and there will not be a vertical
bar, (I think)

long ll_first_row, ll_last_row

ll_first_row= long(dw_1.Describe("DataWindow.FirstRowOnPage"))
ll_last_row= long(dw_1.Describe("DataWindow.LastRowOnPage"))

(ll_first_row = 1) and (ll_last_row < dw_1.rowcount) then not visible

Alex

PS. I did not actually code and test this.

PPS. Why do you care?

<Jaspreet> wrote in message news:485aaaa1.728e.1681692777@sybase.com...
> Hi,
>
> Is there a way to find out from code if the horizontal
> and/or vertical scrollbar is visible on the datawindow?
>
> Thanks.


Paul Horan[TeamSybase] Posted on 2008-06-19 21:48:02.0Z
From: "Paul Horan[TeamSybase]" <phoran_nospam@sybase.com>
Newsgroups: sybase.public.powerbuilder.datawindow
References: <485aaaa1.728e.1681692777@sybase.com> <485acc5e$1@forums-1-dub>
Subject: Re: How to tell if scrollbars are visible or not
Lines: 48
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.3138
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.3198
X-RFC2646: Format=Flowed; Response
NNTP-Posting-Host: vip152.sybase.com
X-Original-NNTP-Posting-Host: vip152.sybase.com
Message-ID: <485ad412$1@forums-1-dub>
Date: 19 Jun 2008 14:48:02 -0700
X-Trace: forums-1-dub 1213912082 10.22.241.152 (19 Jun 2008 14:48:02 -0700)
X-Original-Trace: 19 Jun 2008 14:48:02 -0700, vip152.sybase.com
X-Authenticated-User: TeamSybase
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.datawindow:87222
Article PK: 416475

We always put an invisible line object at the far right hand side of the
rightmost column for that very reason.

integer( dw_1.describe( l_rightedge.x + l_rightedge.width )) will tell you
the right-most "thing" on the page.

Paul Horan[TeamSybase]

"Alex Whitney" <alexw55@pdq.net> wrote in message
news:485acc5e$1@forums-1-dub...
> Horizontal I'm not sure about but I pretty sure that if its enabled and
> there are objects on the datawindow object that extend past the right edge
> then the bar will display. You would have to iterate through all of the
> objects on the datawindow and determine if the (x + width) of the object
> is
> > width of the control
>
>
> Vertical will show if there are more rows than can be displayed and the
> bar is enabled. So see if 'lastrowonpage' is less than the number of rows
> in the datawindow and that firstrowonpage is = 1 and there will not be a
> vertical bar, (I think)
>
> long ll_first_row, ll_last_row
>
> ll_first_row= long(dw_1.Describe("DataWindow.FirstRowOnPage"))
> ll_last_row= long(dw_1.Describe("DataWindow.LastRowOnPage"))
>
> (ll_first_row = 1) and (ll_last_row < dw_1.rowcount) then not visible
>
> Alex
>
> PS. I did not actually code and test this.
>
> PPS. Why do you care?
>
>
> <Jaspreet> wrote in message news:485aaaa1.728e.1681692777@sybase.com...
>> Hi,
>>
>> Is there a way to find out from code if the horizontal
>> and/or vertical scrollbar is visible on the datawindow?
>>
>> Thanks.
>
>


Ted Zimmerman [Sybase] Posted on 2008-06-19 20:34:36.0Z
Sender: 6a66.485a6fcc.1804289383@sybase.com
From: Ted Zimmerman [Sybase]
Newsgroups: sybase.public.powerbuilder.datawindow
Subject: Re: How to tell if scrollbars are visible or not
X-Mailer: WebNews to Mail Gateway v1.1t
Message-ID: <485ac2dc.755a.1681692777@sybase.com>
References: <485aaaa1.728e.1681692777@sybase.com>
NNTP-Posting-Host: 10.22.241.41
X-Original-NNTP-Posting-Host: 10.22.241.41
Date: 19 Jun 2008 13:34:36 -0700
X-Trace: forums-1-dub 1213907676 10.22.241.41 (19 Jun 2008 13:34:36 -0700)
X-Original-Trace: 19 Jun 2008 13:34:36 -0700, 10.22.241.41
Lines: 15
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.datawindow:87220
Article PK: 416482

boolean lb_vscroll, lb_hscroll

lb_vscroll = dw_1.vscrollbar
lb_hscroll = dw_1.hscrollbar

Test whether the varibles evaluate to true or false.

HTH

> Hi,
>
> Is there a way to find out from code if the horizontal
> and/or vertical scrollbar is visible on the datawindow?
>
> Thanks.


Jeremy Lakeman Posted on 2008-06-22 23:31:13.0Z
From: Jeremy Lakeman <jeremy.lakeman@gmail.com>
Newsgroups: sybase.public.powerbuilder.datawindow
Subject: Re: How to tell if scrollbars are visible or not
Date: Sun, 22 Jun 2008 16:31:13 -0700 (PDT)
Organization: http://groups.google.com
Lines: 13
Message-ID: <ce8d7ae1-e2c8-48be-804c-160c24ceae91@34g2000hsf.googlegroups.com>
References: <485aaaa1.728e.1681692777@sybase.com>
NNTP-Posting-Host: 203.122.242.105
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
X-Trace: posting.google.com 1214177473 29736 127.0.0.1 (22 Jun 2008 23:31:13 GMT)
X-Complaints-To: groups-abuse@google.com
NNTP-Posting-Date: Sun, 22 Jun 2008 23:31:13 +0000 (UTC)
Complaints-To: groups-abuse@google.com
Injection-Info: 34g2000hsf.googlegroups.com; posting-host=203.122.242.105; posting-account=euaBtgoAAAC_vDxfsxmpMKlBxHaHpmRS
User-Agent: G2/1.0
X-HTTP-UserAgent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9) Gecko/2008052906 Firefox/3.0,gzip(gfe),gzip(gfe)
X-HTTP-Via: 1.1 asp.essential.intranet:3128 (squid/2.5.STABLE8)
Path: forums-1-dub!forums-master!newssvr.sybase.com!news-sj-1.sprintlink.net!news-peer1.sprintlink.net!nntp1.phx1.gblx.net!nntp.gblx.net!nntp.gblx.net!border2.nntp.dca.giganews.com!nntp.giganews.com!postnews.google.com!34g2000hsf.googlegroups.com!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.datawindow:87231
Article PK: 416489


On Jun 20, 3:51 am, Jaspreet wrote:
> Hi,
>
> Is there a way to find out from code if the horizontal
> and/or vertical scrollbar is visible on the datawindow?
>
> Thanks.

Add a pbm_size event to the datawindow. Then if width != (newwidth +
border size) there is a vertical scroll bar.

From memory, the newwidth and newheight arguments may give a value in
pixels and not powerbuilder units.