[Gambas-user] SetFocus on DataBrowser

Charlie Reinl Karl.Reinl at ...9...
Sun Nov 22 12:53:49 CET 2009


Am Sonntag, den 22.11.2009, 22:06 +1100 schrieb
nospam.nospam.nospam at ...626...:
> Toni wrote:
> > Hi there,
> >
> > I think it's got to do with the order that events fire... In any case,
> > if you use the event "GotFocus" of the TabStrip, it should work as you
> > expect.
> 
> Ok, that's far better than it was, many, many thanks. However after moving 
> the code into GotFocus the first row of the DataBrowser is never 
> highlighted. When the down arrow is pressed first on entering the tab, the 
> second row is highlighted, even though the first was not highlighted. When 
> the up arrow is pressed first on entering the tab, the first row highlights.
> 
> <squint>
> 
> I see no methods available that will allow me to force the first row to 
> highlight :(
> 
> I tried moving rows and refreshing the datasource. I still can't get that 
> first row to highlight.
> 
> I could send fake keyboard events to fix it but that's hardly kosher. 

Salut,

in you example give     DataBrowser1.GridView.Rows[0].Selected = TRUE a
chance but inot in GotFocus, that raise when start the form.
SET it in Tab_Click.
-- 
Amicalement
Charlie





More information about the User mailing list