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.

RichText Datawindow Page Scrolling

3 posts in DataWindow Last posting was on 2009-10-08 15:46:59.0Z
Bazza Posted on 2009-10-08 12:43:56.0Z
From: Bazza <lmugnai@gmail.com>
Newsgroups: sybase.public.powerbuilder.datawindow
Subject: RichText Datawindow Page Scrolling
Date: Thu, 8 Oct 2009 05:43:56 -0700 (PDT)
Organization: http://groups.google.com
Lines: 17
Message-ID: <58e4669b-9d48-40ce-b49a-ad0357e456b5@j28g2000vbl.googlegroups.com>
NNTP-Posting-Host: 82.152.73.234
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
X-Trace: posting.google.com 1255005836 5566 127.0.0.1 (8 Oct 2009 12:43:56 GMT)
X-Complaints-To: groups-abuse@google.com
NNTP-Posting-Date: Thu, 8 Oct 2009 12:43:56 +0000 (UTC)
Complaints-To: groups-abuse@google.com
Injection-Info: j28g2000vbl.googlegroups.com; posting-host=82.152.73.234; posting-account=LXBxRgoAAAB8RY7zdGY8Jb_Z9dzqYdWv
User-Agent: G2/1.0
X-HTTP-Via: 1.1 CINTRA-ISA
X-HTTP-UserAgent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-GB; rv:1.9.0.10) Gecko/2009042822 Firefox/3.0.10 GTB5,gzip(gfe),gzip(gfe)
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!j28g2000vbl.googlegroups.com!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.datawindow:90070
Article PK: 409679

Hi,

What I have is a list of people in a datawindow alongside a RichText
Datawindow which displays letters. Now, I have all letters displaying
correctly but what I would like is on the selectionchanged event of
the people datawindow is to scroll to the relevant letter in the RTDW.
I almost have this working using the code below by keeping a track of
what page I'm on then scrolling backwards and forwards using
scrollprior/nextpage until I get to the page I want, however, if I
click on a person, then scroll through the letters using the scroll
bar I no longer have any notion of what page I'm on. Is there a better
way of knowing what page i'm on at any giving time? I noticed there is
a selectedpage() function but this strangely only works on
RichTextEdit controls. Any help would be appreciated.

Cheers
Lorenzo


Bazza Posted on 2009-10-08 12:46:18.0Z
From: Bazza <lmugnai@gmail.com>
Newsgroups: sybase.public.powerbuilder.datawindow
Subject: Re: RichText Datawindow Page Scrolling
Date: Thu, 8 Oct 2009 05:46:18 -0700 (PDT)
Organization: http://groups.google.com
Lines: 49
Message-ID: <da553eb2-49f4-49ae-ba0a-fd367fb6b68b@j19g2000vbp.googlegroups.com>
References: <58e4669b-9d48-40ce-b49a-ad0357e456b5@j28g2000vbl.googlegroups.com>
NNTP-Posting-Host: 82.152.73.234
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
X-Trace: posting.google.com 1255005978 28593 127.0.0.1 (8 Oct 2009 12:46:18 GMT)
X-Complaints-To: groups-abuse@google.com
NNTP-Posting-Date: Thu, 8 Oct 2009 12:46:18 +0000 (UTC)
Complaints-To: groups-abuse@google.com
Injection-Info: j19g2000vbp.googlegroups.com; posting-host=82.152.73.234; posting-account=LXBxRgoAAAB8RY7zdGY8Jb_Z9dzqYdWv
User-Agent: G2/1.0
X-HTTP-Via: 1.1 CINTRA-ISA
X-HTTP-UserAgent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-GB; rv:1.9.0.10) Gecko/2009042822 Firefox/3.0.10 GTB5,gzip(gfe),gzip(gfe)
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!j19g2000vbp.googlegroups.com!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.datawindow:90073
Article PK: 409678

Sorry, forgot code:

//set the current row
il_CurrentRow = currentrow

//scroll to the person's page
IF il_CurrentPage < il_CurrentRow THEN

FOR il_PageCout = il_CurrentPage TO il_CurrentRow - 1

//scroll 1 page
Parent.dw_letter.scrollnextpage( )

NEXT

ELSEIF il_CurrentPage > il_CurrentRow THEN

FOR il_PageCout = il_CurrentPage TO il_CurrentRow + 1 STEP -1

//scroll back 1 page
Parent.dw_letter.scrollpriorpage( )

NEXT

END IF

il_CurrentPage = il_CurrentRow

On 8 Oct, 13:43, Bazza <lmug...@gmail.com> wrote:
> Hi,
>
> What I have is a list of people in a datawindow alongside a RichText
> Datawindow which displays letters. Now, I have all letters displaying
> correctly but what I would like is on the selectionchanged event of
> the people datawindow is to scroll to the relevant letter in the RTDW.
> I almost have this working using the code below by keeping a track of
> what page I'm on then scrolling backwards and forwards using
> scrollprior/nextpage until I get to the page I want, however, if I
> click on a person, then scroll through the letters using the scroll
> bar I no longer have any notion of what page I'm on. Is there a better
> way of knowing what page i'm on at any giving time? I noticed there is
> a selectedpage() function but this strangely only works on
> RichTextEdit controls. Any help would be appreciated.
>
> Cheers
> Lorenzo


Bazza Posted on 2009-10-08 15:46:59.0Z
From: Bazza <lmugnai@gmail.com>
Newsgroups: sybase.public.powerbuilder.datawindow
Subject: Re: RichText Datawindow Page Scrolling
Date: Thu, 8 Oct 2009 08:46:59 -0700 (PDT)
Organization: http://groups.google.com
Lines: 55
Message-ID: <741079bf-de76-4c96-bdc7-3e7028c94ebd@j19g2000vbp.googlegroups.com>
References: <58e4669b-9d48-40ce-b49a-ad0357e456b5@j28g2000vbl.googlegroups.com> <da553eb2-49f4-49ae-ba0a-fd367fb6b68b@j19g2000vbp.googlegroups.com>
NNTP-Posting-Host: 82.152.73.234
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
X-Trace: posting.google.com 1255016819 12991 127.0.0.1 (8 Oct 2009 15:46:59 GMT)
X-Complaints-To: groups-abuse@google.com
NNTP-Posting-Date: Thu, 8 Oct 2009 15:46:59 +0000 (UTC)
Complaints-To: groups-abuse@google.com
Injection-Info: j19g2000vbp.googlegroups.com; posting-host=82.152.73.234; posting-account=LXBxRgoAAAB8RY7zdGY8Jb_Z9dzqYdWv
User-Agent: G2/1.0
X-HTTP-Via: 1.1 CINTRA-ISA
X-HTTP-UserAgent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-GB; rv:1.9.0.10) Gecko/2009042822 Firefox/3.0.10 GTB5,gzip(gfe),gzip(gfe)
Path: forums-1-dub!forums-master!newssvr.sybase.com!news-sj-1.sprintlink.net!news-peer1.sprintlink.net!newsfeed.yul.equant.net!novia!news-out.readnews.com!transit3.readnews.com!postnews.google.com!j19g2000vbp.googlegroups.com!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.datawindow:90076
Article PK: 409682

Fixed it by using PageAbs()

Cheers

On Oct 8, 1:46 pm, Bazza <lmug...@gmail.com> wrote:
> Sorry, forgot code:
>
> //set the current row
> il_CurrentRow = currentrow
>
> //scroll to the person's page
> IF il_CurrentPage < il_CurrentRow THEN
>
>         FOR il_PageCout = il_CurrentPage TO il_CurrentRow - 1
>
>                 //scroll 1 page
>                 Parent.dw_letter.scrollnextpage( )
>
>         NEXT
>
> ELSEIF il_CurrentPage > il_CurrentRow THEN
>
>         FOR il_PageCout = il_CurrentPage TO il_CurrentRow + 1 STEP -1
>
>                 //scroll back 1 page
>                 Parent.dw_letter.scrollpriorpage( )
>
>         NEXT
>
> END IF
>
> il_CurrentPage = il_CurrentRow
>
> On 8 Oct, 13:43, Bazza <lmug...@gmail.com> wrote:
>
> > Hi,
>
> > What I have is a list of people in a datawindow alongside a RichText
> > Datawindow which displays letters. Now, I have all letters displaying
> > correctly but what I would like is on the selectionchanged event of
> > the people datawindow is to scroll to the relevant letter in the RTDW.
> > I almost have this working using the code below by keeping a track of
> > what page I'm on then scrolling backwards and forwards using
> > scrollprior/nextpage until I get to the page I want, however, if I
> > click on a person, then scroll through the letters using the scroll
> > bar I no longer have any notion of what page I'm on. Is there a better
> > way of knowing what page i'm on at any giving time? I noticed there is
> > a selectedpage() function but this strangely only works on
> > RichTextEdit controls. Any help would be appreciated.
>
> > Cheers
> > Lorenzo