[Gambas-user] Messing with TextBoxes
Stefano Palmeri
rospolosco at ...152...
Wed Jan 30 12:30:47 CET 2008
Alle 12:01, mercoledì 30 gennaio 2008, Piramix Tecnologías ha scritto:
> Hi, I'm still looking for the solution to my problem (see below). Someone
> told me to store the control not the name of it in a variable but I can't
> do that (I can't figure out how really). I'll try to be more specific
> reproducin what I'd like to do.
> In a form I've got a combobox with values from 1 to 10 (I posted 3 before
> just as an example). In that same form I also defined 10 different
> textboxes (just say they're called textVar01, textVar02, and so on...)
> DISABLED by default. Once the user (this MUST be done during runtime)
> clicks the combobox I need to enable as many textboxes as the user selected
> (if 1 the first, if 3 the first 3 textboxes, if 10 all of them, and so
> on...). How can I do that whit the controls I have?
> Or better... how should I modify the code? Take in consideration that I
> designed it that way 'cause I store in a database each record including the
> munber of variables entered and each variable separated as a way of
> control. Any help will be appreciated.
> Thanks.
> Pablo.
>
> > > ----- Original Message -----
> > > From: "Fabien Bodard" <gambas.fr at ...626...>
> > > To: "mailing list for gambas users" <gambas-user at ...625...t>
> > > Subject: Re: [Gambas-user] Question about enabling a TextBox
> > > Date: Sun, 27 Jan 2008 12:32:49 +0100
> > >
> > > 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
> > >
> > > -----------------------------------------------------------------------
> > >-- This SF.net email is sponsored by: Microsoft
> > > Defy all challenges. Microsoft(R) Visual Studio 2008.
> > > http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
> > > _______________________________________________
> > > Gambas-user mailing list
> > > Gambas-user at lists.sourceforge.net
> > > https://lists.sourceforge.net/lists/listinfo/gambas-user
> >
> > --
> > Want an e-mail address like mine?
> > Get a free e-mail account today at www.mail.com!
> >
I'm not sure that I understood, but I've attached an example.
Stefano
> >
> > -------------------------------------------------------------------------
> > This SF.net email is sponsored by: Microsoft
> > Defy all challenges. Microsoft(R) Visual Studio 2008.
> > http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
> > _______________________________________________
> > Gambas-user mailing list
> > Gambas-user at lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/gambas-user
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pablo-0.0.1.tar.gz
Type: application/x-tgz
Size: 7865 bytes
Desc: not available
URL: <http://lists.gambas-basic.org/pipermail/user/attachments/20080130/961c4fb9/attachment.bin>
More information about the User
mailing list