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.

Proportionally spaced labels for tree view items...

2 posts in General Discussion (Chinese) Last posting was on 2007-10-23 08:12:27.0Z
dave Posted on 2007-10-09 17:27:58.0Z
Sender: 7532.470bb848.1804289383@sybase.com
From: Dave
Newsgroups: sybase.public.chinese.powerbuilder.general
Subject: Proportionally spaced labels for tree view items...
X-Mailer: WebNews to Mail Gateway v1.1t
Message-ID: <470bba1e.7568.1681692777@sybase.com>
NNTP-Posting-Host: 10.22.241.41
X-Original-NNTP-Posting-Host: 10.22.241.41
Date: 9 Oct 2007 10:27:58 -0700
X-Trace: forums-1-dub 1191950878 10.22.241.41 (9 Oct 2007 10:27:58 -0700)
X-Original-Trace: 9 Oct 2007 10:27:58 -0700, 10.22.241.41
Lines: 17
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.chinese.powerbuilder.general:299
Article PK: 104324

Hello.

I am using PB11 and would like to create a treeview that has
nicely spaced labels. For example if the label of a treeview
is supposed to be: first_name + last_name + city I would
like to see this
[-]
-- | John | Smith | New York |
-- | Susan | Scratchy | Los Angeles |
-- | Bill | Jones | Toronto |

Has anyone accomplished this ? the obvious things like
padding with spaces, or appending TABS will not work. I
would ideally like to use a Treeview datawindow but it does
not allow nesting of the groups...

Any help would be appreciated.


hni Posted on 2007-10-23 08:12:27.0Z
From: "hni" <hni@sybase.com>
Newsgroups: sybase.public.chinese.powerbuilder.general
References: <470bba1e.7568.1681692777@sybase.com>
Subject: Re: Proportionally spaced labels for tree view items...
Lines: 43
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.3138
X-RFC2646: Format=Flowed; Original
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.3138
NNTP-Posting-Host: hni-desktop.sybase.com
X-Original-NNTP-Posting-Host: hni-desktop.sybase.com
Message-ID: <471daceb$1@forums-1-dub>
Date: 23 Oct 2007 01:12:27 -0700
X-Trace: forums-1-dub 1193127147 10.42.15.118 (23 Oct 2007 01:12:27 -0700)
X-Original-Trace: 23 Oct 2007 01:12:27 -0700, hni-desktop.sybase.com
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.chinese.powerbuilder.general:303
Article PK: 104330

Hi,Dave

Maybe you could try to use Fill() when you need to setitem.

Since you need specify the initial field length and calc the spaces you
would fill.

suppose that

Field name length
First_name 10
last_name 10
city 10

then

ltv_item.label = First_name + fill(' ',10 - len(First_name)) + "|"+
Last_name + fill(' ',10 - len(Last_name)) + "|" + City

<Dave> wrote in message news:470bba1e.7568.1681692777@sybase.com...
> Hello.
>
> I am using PB11 and would like to create a treeview that has
> nicely spaced labels. For example if the label of a treeview
> is supposed to be: first_name + last_name + city I would
> like to see this
> [-]
> -- | John | Smith | New York |
> -- | Susan | Scratchy | Los Angeles |
> -- | Bill | Jones | Toronto |
>
> Has anyone accomplished this ? the obvious things like
> padding with spaces, or appending TABS will not work. I
> would ideally like to use a Treeview datawindow but it does
> not allow nesting of the groups...
>
> Any help would be appreciated.