[Gambas-user] Setfocus issue

Ron ron at ...1740...
Thu Jun 26 01:30:00 CEST 2008


Like so:
---

PUBLIC SUB Button3_Click()

  OpenPage(FBarcode)

END

' load a page onto the workspace
PUBLIC SUB OpenPage(hForm AS Form)

  Workspace1.Add(hForm)
  Workspace1.ActiveWindow = hForm
  hForm.SetFocus
 
END
---

Instead of:

PUBLIC SUB Button1_Click()

  FBarcode.Show

END

Regards,
Ron.


> what do you mean load it from a "workspace"
>
>
> On Wed, Jun 25, 2008 at 3:23 PM, Ron <ron at ...1740...> wrote:
>   
>> Hi,
>>
>> I have a window with 2 Textboxes I want to give focus to TextBox2 upon
>> loading of the form, if I open the form as a normal window, it's ok.
>> Textbox2 gets the focus.
>> If I load the form on a workspace, TextBox2.SetFocus doesn't work.
>>
>> See attached example project
>>
>> Do I have to reread the docs and shame myself, or should it work the same
>> way with workspace and normal window?
>>
>> Regards,
>> Ron the 2nd.
>>
>> -------------------------------------------------------------------------
>> Check out the new SourceForge.net Marketplace.
>> It's the best place to buy or sell services for
>> just about anything Open Source.
>> http://sourceforge.net/services/buy/index.php
>> _______________________________________________
>> Gambas-user mailing list
>> Gambas-user at lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/gambas-user
>>
>>
>>     
>
> -------------------------------------------------------------------------
> Check out the new SourceForge.net Marketplace.
> It's the best place to buy or sell services for
> just about anything Open Source.
> http://sourceforge.net/services/buy/index.php
> _______________________________________________
> 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