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.

SetFocus() problem with the ListView control in PB9

2 posts in Objects Last posting was on 2003-08-07 20:16:32.0Z
Dan Korins Posted on 2003-08-07 19:41:31.0Z
From: "Dan Korins" <dmkorins@schonfeld.com>
Newsgroups: sybase.public.powerbuilder.objects
Subject: SetFocus() problem with the ListView control in PB9
Lines: 24
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 5.50.4807.1700
X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4807.1700
NNTP-Posting-Host: 204.52.175.4
X-Original-NNTP-Posting-Host: 204.52.175.4
Message-ID: <3f32ab6b$1@forums-1-dub>
Date: 7 Aug 2003 12:41:31 -0700
X-Trace: forums-1-dub 1060285291 204.52.175.4 (7 Aug 2003 12:41:31 -0700)
X-Original-Trace: 7 Aug 2003 12:41:31 -0700, 204.52.175.4
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.objects:7537
Article PK: 734823

I have converted an application to PB Version 9.0 Build 5507 from PB 6.5.

In PB 6.5, the following script selects the first item in the listview
and sets focus on the control, allowing for the use of shortcut keys such as
the arrow key:

listviewitem lvi

lv_activity.GetItem(1, lvi)
lvi.Selected = True
lv_activity.SetItem(1, lvi)

lv_activity.SetFocus ()

In PB9, the SetFocus() function seems to work differently. When I press the
arrow key, the first keystroke seems to set focus while the second keystroke
functions as in PB6 by moving to the next item in the list and highlighting
it.

I've tried every trick I can think of, but can't mimic the way SetFocus()
works in PB6. It wouldn't be that big a deal, but some users actually use
shortcut keys rather heavily. Anyone have any ideas?


Philip Salgannik Posted on 2003-08-07 20:16:32.0Z
Sender: 4b48.3f32b2a2.1804289383@sybase.com
From: Philip Salgannik
Newsgroups: sybase.public.powerbuilder.objects
Subject: Re: SetFocus() problem with the ListView control in PB9
X-Mailer: WebNews to Mail Gateway v1.1s
Message-ID: <3f32b3a0.4c6b.846930886@sybase.com>
References: <3f32ab6b$1@forums-1-dub>
NNTP-Posting-Host: 10.22.241.41
X-Original-NNTP-Posting-Host: 10.22.241.41
Date: 7 Aug 2003 13:16:32 -0700
X-Trace: forums-1-dub 1060287392 10.22.241.41 (7 Aug 2003 13:16:32 -0700)
X-Original-Trace: 7 Aug 2003 13:16:32 -0700, 10.22.241.41
Lines: 18
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.objects:7539
Article PK: 734825

Starting with PB7 each release in it's readme file has
mentioned this:

ListView and TreeView controls events changed
---------------------------------------------
PowerBuilder 7 and later use Microsoft ListView and TreeView
controls.
As a result, you may see some changes in behavior that
require you to
remap some events. <SNIP>

That might be your problem...

> I have converted an application to PB Version 9.0 Build
> 5507 from PB 6.5.
>
> In PB 6.5, the following script selects the first item
> in the listview