HOW EXIT FROM A BTNBMP (button)

HOW EXIT FROM A BTNBMP (button)

Postby Romeo » Tue Oct 04, 2011 9:01 am

HI to all,
i'am not able to exit from a dialog by pressing a button BTNBMP.
this is a small example.
(Of course i need and i want to use BTNBMP)
(EMG suggest ask you)

#include "FiveWin.ch"
*
function Main()

local oDlg,obut
local pippo:= space(40)

DEFINE DIALOG oDlg TITLE "TEST" from 0,0 to 250,350 pixel

@10,10 SAY "leave the field empty and click non exit button" OF oDlg pixel
@28,10 GET pippo OF oDlg pixel valid ! empty(pippo)

@90,10 BTNBMP obtn prompt "exit: not possible if empty pippo" OF oDlg ;
ACTION oDlg:End() pixel size 100,20

ACTIVATE DIALOG oDlg CENTERED

return nil


romeo/zingoni
Romeo
 
Posts: 340
Joined: Thu Jan 25, 2007 3:53 pm
Location: Milan (Italy)

Re: HOW EXIT FROM A BTNBMP (button)

Postby Marcelo Via Giglio » Tue Oct 04, 2011 11:16 am

Hola

add obtn:lCancel := .T.

regards

Marcelo
Marcelo Via Giglio
 
Posts: 1064
Joined: Fri Oct 07, 2005 3:33 pm
Location: Cochabamba - Bolivia

Re: HOW EXIT FROM A BTNBMP (button)

Postby Romeo » Fri Oct 07, 2011 3:41 pm

it works !

tks
Romeo
 
Posts: 340
Joined: Thu Jan 25, 2007 3:53 pm
Location: Milan (Italy)

Re: HOW EXIT FROM A BTNBMP (button)

Postby Romeo » Wed Oct 12, 2011 9:38 am

..... and how can i DEFAULT it ?

i tried obtn:lDefault := .T.

but it does not works !!

...somethings to got the focus ?
tks
Romeo
 
Posts: 340
Joined: Thu Jan 25, 2007 3:53 pm
Location: Milan (Italy)


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 82 guests