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.

window - events open activate show

3 posts in Powerscript Last posting was on 2010-03-15 14:27:48.0Z
Didier CHAMBON Posted on 2010-03-11 08:43:04.0Z
Reply-To: "Didier CHAMBON" <dchambon@figaromedias.fr>
From: "Didier CHAMBON" <dchambon@figaromedias.fr>
Newsgroups: sybase.public.powerbuilder.powerscript
Subject: window - events open activate show
Lines: 43
Organization: FigaroMedias
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.5512
X-RFC2646: Format=Flowed; Original
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.5512
NNTP-Posting-Host: vip152.sybase.com
X-Original-NNTP-Posting-Host: vip152.sybase.com
Message-ID: <4b98ad18$1@forums-1-dub>
Date: 11 Mar 2010 00:43:04 -0800
X-Trace: forums-1-dub 1268296984 10.22.241.152 (11 Mar 2010 00:43:04 -0800)
X-Original-Trace: 11 Mar 2010 00:43:04 -0800, vip152.sybase.com
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.powerscript:27342
Article PK: 793700

Hello,

I'm looking for a tutorial that explains the best place (open, activate,
show) to code setfocus() and other function for window control's

I have a the following code in the open of my window

date d
time t
this.setPosition(TopMost!)
this.setPosition(NoTopMost!)
this.title = gs_codesupport + ": " + Message.StringParm
IF gb_xml THEN // codage xml
d = date(gs_date_parution)
t=time("12:00:00")
dp_parution.setValue(d,t)
dp_parution.enabled = FALSE
em_numinside.text = gs_numInside
em_numinside.enabled = FALSE
em_client.text = gs_nomClient
em_client.setfocus( )
ELSE // codage manuel
dp_parution.MinDate = RelativeDate(ToDay(), 1)
gs_chromie = "quadri"
gs_formatFichier = "pdf"
em_numinside.text= "0000000000"
END IF

and in the getfocus of em_client

st_message.text = ''
this.SelectText(1, Len(this.Text))

But when the window displays em_client's text is not selected
however if I put the this.SelectText(1, Len(this.Text)) just after
em_client.setfocus( )
in the open the text is selected.

Thanks for your answers,
Best regards,
Didier


jwayt Posted on 2010-03-15 13:42:32.0Z
From: jwayt <jwayt_nospam@iobar.com>
Newsgroups: sybase.public.powerbuilder.powerscript
Subject: Re: window - events open activate show
Message-ID: <MPG.2607f52260f0c9f1989681@forums.sybase.com>
References: <4b98ad18$1@forums-1-dub>
Reply-To: jwayt_nospam@iobar.com
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
User-Agent: MicroPlanet-Gravity/2.9.14
NNTP-Posting-Host: vip152.sybase.com
X-Original-NNTP-Posting-Host: vip152.sybase.com
Date: 15 Mar 2010 05:42:32 -0800
X-Trace: forums-1-dub 1268660552 10.22.241.152 (15 Mar 2010 05:42:32 -0800)
X-Original-Trace: 15 Mar 2010 05:42:32 -0800, vip152.sybase.com
Lines: 51
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.powerscript:27343
Article PK: 761818

A window does not show until it returns from the open event. SetFocus()
will not be effective without anything to get focus.

If you code em_client.POST setFocus() this function will call after all
other events on the stack have processed.

In article <4b98ad18$1@forums-1-dub>, dchambon@figaromedias.fr says...

>
> Hello,
>
> I'm looking for a tutorial that explains the best place (open, activate,
> show) to code setfocus() and other function for window control's
>
> I have a the following code in the open of my window
>
> date d
> time t
> this.setPosition(TopMost!)
> this.setPosition(NoTopMost!)
> this.title = gs_codesupport + ": " + Message.StringParm
> IF gb_xml THEN // codage xml
> d = date(gs_date_parution)
> t=time("12:00:00")
> dp_parution.setValue(d,t)
> dp_parution.enabled = FALSE
> em_numinside.text = gs_numInside
> em_numinside.enabled = FALSE
> em_client.text = gs_nomClient
> em_client.setfocus( )
> ELSE // codage manuel
> dp_parution.MinDate = RelativeDate(ToDay(), 1)
> gs_chromie = "quadri"
> gs_formatFichier = "pdf"
> em_numinside.text= "0000000000"
> END IF
>
> and in the getfocus of em_client
>
> st_message.text = ''
> this.SelectText(1, Len(this.Text))
>
> But when the window displays em_client's text is not selected
> however if I put the this.SelectText(1, Len(this.Text)) just after
> em_client.setfocus( )
> in the open the text is selected.
>
> Thanks for your answers,
> Best regards,
> Didier


Terry Dykstra [TeamSybase] Posted on 2010-03-15 14:27:48.0Z
Reply-To: "Terry Dykstra [TeamSybase]" <dontreply_tddykstra@forestoil.ca.x>
From: "Terry Dykstra [TeamSybase]" <tddykstra@forestoil.ca>
Newsgroups: sybase.public.powerbuilder.powerscript
References: <4b98ad18$1@forums-1-dub> <MPG.2607f52260f0c9f1989681@forums.sybase.com>
Subject: Re: window - events open activate show
Lines: 69
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.3598
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.3350
X-RFC2646: Format=Flowed; Original
NNTP-Posting-Host: vip152.sybase.com
X-Original-NNTP-Posting-Host: vip152.sybase.com
Message-ID: <4b9e43e4$1@forums-1-dub>
Date: 15 Mar 2010 06:27:48 -0800
X-Trace: forums-1-dub 1268663268 10.22.241.152 (15 Mar 2010 06:27:48 -0800)
X-Original-Trace: 15 Mar 2010 06:27:48 -0800, vip152.sybase.com
X-Authenticated-User: TeamSybase
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.powerscript:27344
Article PK: 793703

And your code is running:

this.setPosition(TopMost!)
this.setPosition(NoTopMost!)

I assume that you only want to run one of these statements.

--
Terry Dykstra (TeamSybase)
http://powerbuilder.codeXchange.sybase.com/
http://casexpress.sybase.com
product enhancement requests:
http://my.isug.com/cgi-bin/1/c/submit_enhancement

"jwayt" <jwayt_nospam@iobar.com> wrote in message
news:MPG.2607f52260f0c9f1989681@forums.sybase.com...
>A window does not show until it returns from the open event. SetFocus()
> will not be effective without anything to get focus.
>
> If you code em_client.POST setFocus() this function will call after all
> other events on the stack have processed.
>
> In article <4b98ad18$1@forums-1-dub>, dchambon@figaromedias.fr says...
>>
>> Hello,
>>
>> I'm looking for a tutorial that explains the best place (open, activate,
>> show) to code setfocus() and other function for window control's
>>
>> I have a the following code in the open of my window
>>
>> date d
>> time t
>> this.setPosition(TopMost!)
>> this.setPosition(NoTopMost!)
>> this.title = gs_codesupport + ": " + Message.StringParm
>> IF gb_xml THEN // codage xml
>> d = date(gs_date_parution)
>> t=time("12:00:00")
>> dp_parution.setValue(d,t)
>> dp_parution.enabled = FALSE
>> em_numinside.text = gs_numInside
>> em_numinside.enabled = FALSE
>> em_client.text = gs_nomClient
>> em_client.setfocus( )
>> ELSE // codage manuel
>> dp_parution.MinDate = RelativeDate(ToDay(), 1)
>> gs_chromie = "quadri"
>> gs_formatFichier = "pdf"
>> em_numinside.text= "0000000000"
>> END IF
>>
>> and in the getfocus of em_client
>>
>> st_message.text = ''
>> this.SelectText(1, Len(this.Text))
>>
>> But when the window displays em_client's text is not selected
>> however if I put the this.SelectText(1, Len(this.Text)) just after
>> em_client.setfocus( )
>> in the open the text is selected.
>>
>> Thanks for your answers,
>> Best regards,
>> Didier
>
>