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.

Treeview repaint problem

4 posts in Objects Last posting was on 2005-07-28 15:17:20.0Z
Tom Posted on 2005-07-15 14:43:45.0Z
From: "Tom" <nobody@home.com>
Newsgroups: sybase.public.powerbuilder.objects
Subject: Treeview repaint problem
Lines: 27
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
X-Original-NNTP-Posting-Host: stanleyassociates.com
Message-ID: <42d7cb9c$1@forums-2-dub>
X-Original-Trace: 15 Jul 2005 07:43:40 -0700, stanleyassociates.com
X-Original-NNTP-Posting-Host: forums-2-dub.sybase.com
X-Original-Trace: 15 Jul 2005 07:43:42 -0700, forums-2-dub.sybase.com
NNTP-Posting-Host: forums-master.sybase.com
X-Original-NNTP-Posting-Host: forums-master.sybase.com
Date: 15 Jul 2005 07:43:45 -0700
X-Trace: forums-1-dub 1121438625 10.22.108.75 (15 Jul 2005 07:43:45 -0700)
X-Original-Trace: 15 Jul 2005 07:43:45 -0700, forums-master.sybase.com
X-Authenticated-User: ngsysop
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.objects:8501
Article PK: 735724

Hi!

We're using PB 9.0.1 Build 7066 and have an odd problem with a tv when
dragging items.

The way it is set up, we have a large amount of info built into each line to
simulate a whole record for an item. The user can drag and drop items onto
each other as well as force a scroll by dragging the item above or below the
tv.

The problem comes in when you leave the tv and enter the window. The
'nodrop' icon gets displayed very briefly while you cross that boundary and
because the image being dragged is a long line of text, it causes the tv to
get sort of a ghost impression of what's being dragged stamped into it. If
you click the scrollbar it causes the tv to repaint properly and cleans it
up.

Using a dragicon also seems to be fine but we need the user to be able to
see the info of the item they are dragging for reference. In this case
dragicon is not an option.

Anyone deal with this or have some ideas? Is there maybe a way to fire the
scrollbar click to get it to go up one row first?

Thanks!


Brad Wery Posted on 2005-07-22 20:01:08.0Z
From: Brad Wery <bradweryatagricoreunited.com>
User-Agent: Mozilla Thunderbird 1.0.2 (Windows/20050317)
X-Accept-Language: en-us, en
MIME-Version: 1.0
Newsgroups: sybase.public.powerbuilder.objects
Subject: Re: Treeview repaint problem
References: <42d7cb9c$1@forums-2-dub>
In-Reply-To: <42d7cb9c$1@forums-2-dub>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Original-NNTP-Posting-Host: ugg10.unitedgrain.ca
Message-ID: <42e15080$1@forums-2-dub>
X-Original-Trace: 22 Jul 2005 13:01:04 -0700, ugg10.unitedgrain.ca
Lines: 62
X-Original-NNTP-Posting-Host: forums-2-dub.sybase.com
X-Original-Trace: 22 Jul 2005 13:01:05 -0700, forums-2-dub.sybase.com
NNTP-Posting-Host: forums-master.sybase.com
X-Original-NNTP-Posting-Host: forums-master.sybase.com
Date: 22 Jul 2005 13:01:08 -0700
X-Trace: forums-1-dub 1122062468 10.22.108.75 (22 Jul 2005 13:01:08 -0700)
X-Original-Trace: 22 Jul 2005 13:01:08 -0700, forums-master.sybase.com
X-Authenticated-User: ngsysop
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.objects:8508
Article PK: 735729

You can put this code in your dragwithin event so you don't have to
leave the treeview to scroll. The only bad part is that you have to keep
moving your mouse back and forth:

long ll_handle
long ll_first_handle

ll_first_handle = this.finditem(FirstVisibleTreeItem!, 0)

if ll_first_handle = handle then
ll_handle = this.finditem(PreviousVisibleTreeItem!, ll_first_handle)

if ll_handle > 0 then

this.SelectItem ( ll_handle )
else

this.SelectItem ( ll_first_handle )
end if
else

this.SelectItem ( handle )

end if


After you drop the item try calling the SetRedraw function for the
treeview to repaint it:

tv_1.SetRedraw(FALSE)
tv_1.SetRedraw(TRUE)

Brad

Tom wrote:
> Hi!
>
> We're using PB 9.0.1 Build 7066 and have an odd problem with a tv when
> dragging items.
>
> The way it is set up, we have a large amount of info built into each line to
> simulate a whole record for an item. The user can drag and drop items onto
> each other as well as force a scroll by dragging the item above or below the
> tv.
>
> The problem comes in when you leave the tv and enter the window. The
> 'nodrop' icon gets displayed very briefly while you cross that boundary and
> because the image being dragged is a long line of text, it causes the tv to
> get sort of a ghost impression of what's being dragged stamped into it. If
> you click the scrollbar it causes the tv to repaint properly and cleans it
> up.
>
> Using a dragicon also seems to be fine but we need the user to be able to
> see the info of the item they are dragging for reference. In this case
> dragicon is not an option.
>
> Anyone deal with this or have some ideas? Is there maybe a way to fire the
> scrollbar click to get it to go up one row first?
>
> Thanks!
>
>


Tom Posted on 2005-07-28 12:37:47.0Z
From: "Tom" <nobody@home.com>
Newsgroups: sybase.public.powerbuilder.objects
References: <42d7cb9c$1@forums-2-dub> <42e15080$1@forums-2-dub>
Subject: Re: Treeview repaint problem
Lines: 67
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.2180
X-RFC2646: Format=Flowed; Response
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180
NNTP-Posting-Host: stanleyassociates.com
X-Original-NNTP-Posting-Host: stanleyassociates.com
Message-ID: <42e8d19b$1@forums-1-dub>
Date: 28 Jul 2005 05:37:47 -0700
X-Trace: forums-1-dub 1122554267 12.172.51.130 (28 Jul 2005 05:37:47 -0700)
X-Original-Trace: 28 Jul 2005 05:37:47 -0700, stanleyassociates.com
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.objects:8513
Article PK: 735736

Thanks Brad, I'll give it a try!

"Brad Wery" <bradweryatagricoreunited.com> wrote in message
news:42e15080$1@forums-2-dub...
> You can put this code in your dragwithin event so you don't have to leave
> the treeview to scroll. The only bad part is that you have to keep moving
> your mouse back and forth:
>
> long ll_handle
> long ll_first_handle
>
> ll_first_handle = this.finditem(FirstVisibleTreeItem!, 0)
>
> if ll_first_handle = handle then
> ll_handle = this.finditem(PreviousVisibleTreeItem!, ll_first_handle)
>
> if ll_handle > 0 then
>
> this.SelectItem ( ll_handle )
> else
>
> this.SelectItem ( ll_first_handle )
> end if
> else
>
> this.SelectItem ( handle )
>
> end if
>
>
> After you drop the item try calling the SetRedraw function for the
> treeview to repaint it:
>
> tv_1.SetRedraw(FALSE)
> tv_1.SetRedraw(TRUE)
>
> Brad
>
> Tom wrote:
>> Hi!
>>
>> We're using PB 9.0.1 Build 7066 and have an odd problem with a tv when
>> dragging items.
>>
>> The way it is set up, we have a large amount of info built into each line
>> to simulate a whole record for an item. The user can drag and drop items
>> onto each other as well as force a scroll by dragging the item above or
>> below the tv.
>>
>> The problem comes in when you leave the tv and enter the window. The
>> 'nodrop' icon gets displayed very briefly while you cross that boundary
>> and because the image being dragged is a long line of text, it causes the
>> tv to get sort of a ghost impression of what's being dragged stamped into
>> it. If you click the scrollbar it causes the tv to repaint properly and
>> cleans it up.
>>
>> Using a dragicon also seems to be fine but we need the user to be able to
>> see the info of the item they are dragging for reference. In this case
>> dragicon is not an option.
>>
>> Anyone deal with this or have some ideas? Is there maybe a way to fire
>> the scrollbar click to get it to go up one row first?
>>
>> Thanks!


Tom Posted on 2005-07-28 15:17:20.0Z
From: "Tom" <nobody@home.com>
Newsgroups: sybase.public.powerbuilder.objects
References: <42d7cb9c$1@forums-2-dub> <42e15080$1@forums-2-dub> <42e8d19b$1@forums-1-dub>
Subject: Re: Treeview repaint problem
Lines: 15
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.2180
X-RFC2646: Format=Flowed; Response
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180
NNTP-Posting-Host: stanleyassociates.com
X-Original-NNTP-Posting-Host: stanleyassociates.com
Message-ID: <42e8f700@forums-1-dub>
Date: 28 Jul 2005 08:17:20 -0700
X-Trace: forums-1-dub 1122563840 12.172.51.130 (28 Jul 2005 08:17:20 -0700)
X-Original-Trace: 28 Jul 2005 08:17:20 -0700, stanleyassociates.com
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.objects:8514
Article PK: 735738

Sorry, this doesn't work. It makes things even worse since the selected
item causes huge smearing while it scrolls.

I did play around with setredraw and got it to clean up a little by turning
off redraw during dragwithin then when you leave the tv and it starts
scrolling you turn setredraw on which seems to fix half the problem. So
it's not as bad as before, but not by much....

Back to fiddling....thanks again for the suggestion!

"Tom" <nobody@home.com> wrote in message news:42e8d19b$1@forums-1-dub...
> Thanks Brad, I'll give it a try!
>