Re: textbox.enable = false

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance

From: Dave (Nobody_at_Nowhere.Com)
Date: 10/19/04


Date: Tue, 19 Oct 2004 16:04:55 +0100

Dont know if this is why he wants it, but I often use a locked text box
instead of a label if I dont know how long the string may be and think it
might be wider than the label/text box, this allows the user to see the
entire contents as well as being able to copy it to the clipboard should
they so desire.
Look at the "labels" on a file system properties sheet to see what I mean.

Dave.

"Saga" <antiSpam@somewhere.com> wrote in message
news:eK4pjretEHA.3200@TK2MSFTNGP09.phx.gbl...
>
> If the user wants the text box to be read only, wouldn't
> a bordered label work too?
>
> Of course, if he want to be able to toggle between
> read-only and read/write, then the label sugestion is
> a no go.
>
> Saga
>
> "Rick Rothstein" <rickNOSPAMnews@NOSPAMcomcast.net> wrote in message
> news:uv%23OuhbtEHA.636@TK2MSFTNGP09.phx.gbl...
>> > I would like to set the enable property on a textbox to false, but
> it
>> should
>> > NOT become shaded, it should stay yhe same as enable=true.
>>
>> First off, almost everybody in this newsgroup is using VB6 or lower.
>> While you may get a stray answer to VB.NET (including VB2003 and
> VB2005
>> which has dropped .NET from its name) questions here, you should ask
>> them in newsgroups devoted exclusively to .NET programming. Look for
>> newsgroups with either the word "dotnet" or "vsnet" in their name.
>>
>> For the microsoft news server, try these newsgroups...
>>
>> microsoft.public.dotnet.general
>> microsoft.public.dotnet.languages.vb
>> microsoft.public.vsnet.general
>>
>> There are some others, but these should get you started.
>>
>> Now, as to your question... in the classic versions of VB, we would
>> suggest putting the TextBox in a borderless Frame (that is, the Frame
>> would be the TextBox's Container) and disabling the Frame. Another
>> suggestion might be (if you don't mind the TextBox receiving focus) to
>> set the TextBox's Locked property to True (user won't be able to
> change
>> the text in the TextBox, but the TextBox can get focus).
>>
>> Rick - MVP
>>
>
>



Relevant Pages

  • Re: frame disappear or get bad if -label is defined
    ... I dont think label is a standard option for Frame widget.. ...
    (comp.lang.perl.tk)
  • Calculated Value to keep in a Table
    ... They dont have any textbox or label in my form because is allready with many of them. ... calculated field is still 0. ...
    (microsoft.public.access.forms)
  • Re: programatically inserting a control within a frame
    ... some other container, eg a frame or multipage, you need to qualify. ... Set myControl2 = MyControl.Add(etc ... now I want to create a textbox and a label within this frame (actually a ...
    (microsoft.public.excel.programming)
  • Re: Write, Move, Delete text on PictureBox
    ... Simply place a Label control ... Now, whenever you want create a Label, you would just use ... TypeOf FormOrPictureBox Is PictureBox Then ... Public Sub TransferTextFromTextBoxToLabel(TB As TextBox, ...
    (comp.lang.basic.visual.misc)
  • Re: Write, Move, Delete text on PictureBox
    ... Simply place a Label control ... Now, whenever you want create a Label, you would just use ... Public Sub TransferTextFromTextBoxToLabel(TB As TextBox, ... Before using the dynamic TextBox, ...
    (comp.lang.basic.visual.misc)