[Gambas-user] Keypress events; Solved!

Gareth Bult gareth at ...1689...
Wed Apr 25 20:03:14 CEST 2007


Ok,

Maybe it's my poor understanding (?) but my code is now working.

This works;

PUBLIC SUB myobj_Keypress()

$grid.MoveTo(0,0)
STOP EVENT

END

... and this does not ...

PUBLIC SUB myobj_Keypress()

STOP EVENT
$grid.MoveTo(0,0)

END

It's now fixed, but I'm curios as to why "STOP EVENT" only works if it's
the last statement executed in the handler (?!)

Gareth.




On Wed, 2007-04-25 at 18:01 +0100, Gareth Bult wrote:

> Hi,
> 
> Yes, I'm afraid I have .. another sample seems to indicate that the
> "STOP EVENT" is being ignored and the gridview is continuing to process
> the keystroke even after I've processed it ...
> 
> :(
> 
> Gareth.
> 
> On Wed, 2007-04-25 at 18:32 +0200, Jacky wrote:
> 
> > Le mercredi 25 avril 2007 15:28, Gareth Bult a écrit :
> > > Hi,
> > >
> > > I'm working with a gridview trying to catch the return key when pressed.
> > > I'm seeing a strange effect, when I first hit the table, my code works
> > > and the keypress event is activated.
> > >
> > > After the first keypress event, I don't then see any more until I click
> > > on the table, at which point I get the first keypress, then no more.
> > >
> > > It's as though after the first keypress event the gridview no longer has
> > > focus (!)
> > >
> > > Anyone any ideas ?
> > >
> > > tia
> > > Gareth.
> > 
> > Hi Gareth
> > 
> > Have you insert the stop event function in your program ?
> > *************************beginning of exemple********************
> > PUBLIC SUB Gridview_keypress()
> > 
> > SELECT CASE LAST.tag
> > CASE 1
> > sub1()
> > STOP EVENT
> > 
> > CASE 2
> > sub2()
> > STOP EVENT
> > 
> > END SELECT
> > END
> > 
> > **********************end of exemple****************************
> > 
> > Jacky
> > 
> > 
> > -------------------------------------------------------------------------
> > This SF.net email is sponsored by DB2 Express
> > Download DB2 Express C - the FREE version of DB2 express and take
> > control of your XML. No limits. Just data. Click to get it now.
> > http://sourceforge.net/powerbar/db2/
> > _______________________________________________
> > Gambas-user mailing list
> > Gambas-user at lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/gambas-user
> 
> -------------------------------------------------------------------------
> This SF.net email is sponsored by DB2 Express
> Download DB2 Express C - the FREE version of DB2 express and take
> control of your XML. No limits. Just data. Click to get it now.
> http://sourceforge.net/powerbar/db2/
> _______________________________________________ Gambas-user mailing list Gambas-user at lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user

-- 
Gareth Bult, Encryptec Limited
Tel: 0845 25 77033, FWD: 753977, Mob: 07891 389657
Email: gareth at ...1689..., MSN:garethbult at ...67... 

Statements made are at all times subject to Encryptec's Terms and Conditions of Business, which are available upon request.





More information about the User mailing list