Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Languages / VB.NET / October 2007

Tip: Looking for answers? Try searching our database.

Simple Label and TextBox question

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
John Heitmuller. - 06 Oct 2007 13:33 GMT
Hi, I just want to make sure I'm not missing something obvious.
VB.Net controls like the CheckBox are implemented with a label
attached to it.  This is very handy.  But the TextBox control has no
implementation with a built-in attached label.  You have to separately
layout your TextBox and Label controls on a form.  It's not a huge
deal, but it would be handy if each TextBox control was automatically
paired with its Label control.

Is this just the way it is, or am I missing something?

Thanks,
John
Stephany Young - 06 Oct 2007 14:40 GMT
It's just the way it is!

Not that the 'label' of the CheckBox  control that you are referring to is
actually it's Text property.

The Text property of the TextBox control is used to set and get the actual
text 'inside' the TextBox.

If you really need such functionality then create a composite user control
comprising a Label and TextBox and thn you will be able to implement it
exactly how you want it.

I would suggest, however, that if having to spend a small amount of time
'laying out' your Labels and TextBoxes is your biggest worry then you doing
very well indeed.

> Hi, I just want to make sure I'm not missing something obvious.
> VB.Net controls like the CheckBox are implemented with a label
[quoted text clipped - 8 lines]
> Thanks,
> John
John Heitmuller. - 06 Oct 2007 16:01 GMT
> I would suggest, however, that if having to spend a small amount of time
> 'laying out' your Labels and TextBoxes is your biggest worry then you doing
> very well indeed.

No, I just did not want other .Net programmers snickering at my forms
because I was 'doing it the hard way'. 8-)
Herfried K. Wagner [MVP] - 06 Oct 2007 19:26 GMT
"Stephany Young" <noone@localhost> schrieb:
> Not that the 'label' of the CheckBox  control that you are referring to is
> actually it's Text property.

That's right.  It's internally not a label control, it's simply drawn by the
Win32/.NET implementation of the control.  So, the checkbox control is not a
composite control, as a button with a caption is not a composite control.

Signature

M S   Herfried K. Wagner
M V P  <URL:http://dotnet.mvps.org/>
V B   <URL:http://classicvb.org/petition/>

Cor Ligthert[MVP] - 06 Oct 2007 18:53 GMT
John,

Realy funny, I am alwasy asking myself why there is a label on that checkbox
(and radiobutton) . I don't want it mostly.

:-)

Cor

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.