[Gambas-user] Valuebox_Enter strange behaviour

Alain Baudrez a.baudrez at ...626...
Sat Nov 1 12:45:06 CET 2014


Tobi,

switched to GotFocus event and everything works fine now.

Txs

A.J.


*Alain J. Baudrez*
Nikolaas Gombertstraat 20
8000 Brugge

a.baudrez at ...626...
Tel: +32(0)486485080

*Personal Homepage:* http://baudrez.be  - Twitter
<http://twitter.com/abaudrez> - Google Plus
<http://plus.google.com/+alainbaudrez>
Webmaster cibliga.be - dierenartsrogiest.be
Linux User: http://linuxmintusers.be

2014-11-01 12:18 GMT+01:00 Tobias Boege <taboege at ...626...>:

> On Sat, 01 Nov 2014, Alain Baudrez wrote:
> > I use a valuebox for numbers and want to select to existing content upon
> > entering the valuebox.
> >
> > I use the following code
> >
> > Public Sub vBoxQty_Enter()
> >   Desktop.SendKeys("{[Shift_L][End]}")
> > End
> >
> > When entering the valuebox using the tab-key, the content is selected.
> > When entering the valuebox with a mouseclick - what most people do -
> > nothing happens. The cursor just blinks in the valuebox but the content
> is
> > not selected.
> >
> > But .... move the mouse away from the valuebox and then back over the
> > valuebox (without clicking) and the content automagically gets selected.
> >
> > By design or a bug?
> >
>
> By design and by documentation. The Enter event is raised when the mouse
> enters the control, in the sense of hovering it.
>
> GotFocus is just the right event for you here. The behaviour when <Tab>-ing
> your way to the control is likely the toolkit's internal one.
>
> Regards,
> Tobi
>
> --
> "There's an old saying: Don't change anything... ever!" -- Mr. Monk
>
>
> ------------------------------------------------------------------------------
> _______________________________________________
> Gambas-user mailing list
> Gambas-user at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/gambas-user
>



More information about the User mailing list