[Gambas-user] Question about enabling a TextBox
Fabien Bodard
gambas.fr at ...626...
Sun Jan 27 12:32:49 CET 2008
On Sunday 27 January 2008 12:03:31 Piramix Tecnologías wrote:
> Good morning people. I've got a little problem and here is it:
> I've got a Form with 3 TextBoxes on it (DISABLED by default) called BoxOne,
> BoxTwo and BoxThree. I need to enable or disable then depnding on the code.
> For that purpose I store the name of each one in a variable called BoxState
> wich is previously defined as String (obviously here's my mistake). When I
> try to do
> BoxState = "BoxOne"
> BoxState.Enabled = TRUE
>
> I got an error.
> How can I do that?
> I even tried to define a TextBox during execution and then destroy the
> control and other steps which I don't remember now but without any success.
> Help will be appreciated.
> Greetings.
> Pablo.
you need to store the object ... not the name !
If you have already named the box in the property windows... yu just have to
use the control name !
TextBox1.Enabled = true
You var is just a string ... so the error is normal
More information about the User
mailing list