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.

Creating dynamic tab page control

4 posts in Objects Last posting was on 2007-08-06 23:44:19.0Z
dma Posted on 2007-08-05 23:53:44.0Z
Sender: 1a0d.46b6627b.1804289383@sybase.com
From: dma
Newsgroups: sybase.public.powerbuilder.objects
Subject: Creating dynamic tab page control
X-Mailer: WebNews to Mail Gateway v1.1t
Message-ID: <46b66308.1a12.1681692777@sybase.com>
NNTP-Posting-Host: 10.22.241.41
X-Original-NNTP-Posting-Host: 10.22.241.41
Date: 5 Aug 2007 16:53:44 -0700
X-Trace: forums-1-dub 1186358024 10.22.241.41 (5 Aug 2007 16:53:44 -0700)
X-Original-Trace: 5 Aug 2007 16:53:44 -0700, 10.22.241.41
Lines: 2
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.objects:9400
Article PK: 736560

Does anyone know a way to dynamically create static text
controls on a tab page?


"John Olson [Team Sybase]" <john.olson Posted on 2007-08-06 00:45:01.0Z
From: "John Olson [Team Sybase]" <john.olson@nospam_teamsybase.com>
Newsgroups: sybase.public.powerbuilder.objects
References: <46b66308.1a12.1681692777@sybase.com>
Subject: Re: Creating dynamic tab page control
Lines: 18
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.2180
x-mimeole: Produced By Microsoft MimeOLE V6.00.2900.2180
X-RFC2646: Format=Flowed; Original
NNTP-Posting-Host: wsip-68-110-50-191.lv.lv.cox.net
X-Original-NNTP-Posting-Host: wsip-68-110-50-191.lv.lv.cox.net
Message-ID: <46b66f0d$1@forums-1-dub>
Date: 5 Aug 2007 17:45:01 -0700
X-Trace: forums-1-dub 1186361101 68.110.50.191 (5 Aug 2007 17:45:01 -0700)
X-Original-Trace: 5 Aug 2007 17:45:01 -0700, wsip-68-110-50-191.lv.lv.cox.net
X-Authenticated-User: TeamSybase
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.objects:9401
Article PK: 736558

I'd say create a statictext user object and save it to your PBL then use
OpenUserObject() to create it. However, I think that only works when the
parent is a window. Other object types that can be created dynamically are
tabpages. This may be a cluge, but what if you put a tab on your tabpage
then dynamically created a tabpage that contained a statictext. ok, sounds
lame, but if you absolutely have to create it dynamically then that might be
the only way. The low tech way is to put the statictext on the tabpage and
set it invisible. Make it visible when you need it.

Regards,
John

<dma> wrote in message news:46b66308.1a12.1681692777@sybase.com...
> Does anyone know a way to dynamically create static text
> controls on a tab page?


Brad Wery [TeamSybase] Posted on 2007-08-06 19:49:56.0Z
From: "Brad Wery [TeamSybase]" <bradweryatgmail.com>
User-Agent: Thunderbird 2.0.0.5 (Windows/20070716)
MIME-Version: 1.0
Newsgroups: sybase.public.powerbuilder.objects
Subject: Re: Creating dynamic tab page control
References: <46b66308.1a12.1681692777@sybase.com>
In-Reply-To: <46b66308.1a12.1681692777@sybase.com>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
NNTP-Posting-Host: stnbmb01bbg-ac04-57-147.dial.mts.net
X-Original-NNTP-Posting-Host: stnbmb01bbg-ac04-57-147.dial.mts.net
Message-ID: <46b77b64@forums-1-dub>
Date: 6 Aug 2007 12:49:56 -0700
X-Trace: forums-1-dub 1186429796 205.200.57.147 (6 Aug 2007 12:49:56 -0700)
X-Original-Trace: 6 Aug 2007 12:49:56 -0700, stnbmb01bbg-ac04-57-147.dial.mts.net
Lines: 13
X-Authenticated-User: teamsybase
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.objects:9402
Article PK: 736559

You can use the OpenUserObject function like John mentioned followed by
a call to the Windows API SetParent function to make it visible on the
tab control.

The other way is to put a datawindow control on the tab control with a
dummy external dataobject. You can then dynamically create static text
controls in the datawindow.

Brad

dma wrote:
> Does anyone know a way to dynamically create static text
> controls on a tab page?


dma Posted on 2007-08-06 23:44:19.0Z
Sender: 1a0d.46b6627b.1804289383@sybase.com
From: dma
Newsgroups: sybase.public.powerbuilder.objects
Subject: Re: Creating dynamic tab page control
X-Mailer: WebNews to Mail Gateway v1.1t
Message-ID: <46b7b253.39a3.1681692777@sybase.com>
References: <46b77b64@forums-1-dub>
NNTP-Posting-Host: 10.22.241.41
X-Original-NNTP-Posting-Host: 10.22.241.41
Date: 6 Aug 2007 16:44:19 -0700
X-Trace: forums-1-dub 1186443859 10.22.241.41 (6 Aug 2007 16:44:19 -0700)
X-Original-Trace: 6 Aug 2007 16:44:19 -0700, 10.22.241.41
Lines: 22
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.objects:9403
Article PK: 736561

Thanks John, Brad. I need to create more than 1 statictext
control and the number of controls will vary. I'll see if I
can get the datawindow suggestion working. Sounds like it
would be the quickest and easiest method.

Thanks again
dma

> You can use the OpenUserObject function like John
> mentioned followed by a call to the Windows API SetParent
> function to make it visible on the tab control.
>
> The other way is to put a datawindow control on the tab
> control with a dummy external dataobject. You can then
> dynamically create static text controls in the
> datawindow.
>
> Brad
>
> dma wrote:
> > Does anyone know a way to dynamically create static text
> > controls on a tab page?