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 / C# / August 2007

Tip: Looking for answers? Try searching our database.

Vertical sizing of controls

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
John B - 21 Aug 2007 23:47 GMT
Hi all,
I want to prevent the user being able to vertically size a control, in
the same manner that single line textbox and autosize labels do.
I can override SetBoundsCore which prevents the actual sizing but the
vertical resize grips still show for the user, even though they have no
effect.

Any ideas appreciated.

JB
pedrito - 22 Aug 2007 02:16 GMT
> Hi all,
> I want to prevent the user being able to vertically size a control, in the
[quoted text clipped - 6 lines]
>
> JB

John,

The TextBox does this (actually TextBoxBase does this) by using a custom
ControlDesigner derived class that overrides the SelectionRules property.
You can do the same. It's really not that difficult. If you do a google
search on ControlDesigner, I'm sure you'll find several tutorials around (I
think CodeProject has some) on how to create and use ControlDesigners..
John B - 22 Aug 2007 05:15 GMT
>> Hi all,
>> I want to prevent the user being able to vertically size a control, in the
[quoted text clipped - 14 lines]
> search on ControlDesigner, I'm sure you'll find several tutorials around (I
> think CodeProject has some) on how to create and use ControlDesigners..

Excellent

Thanks pedrito.

JB

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.