473,406 Members | 2,343 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

Vertical sizing of controls

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
Aug 21 '07 #1
2 1667
"John B" <jb******@yahoo.comwrote in message news:fa**********@aioe.org...
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
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..
Aug 22 '07 #2
pedrito wrote:
"John B" <jb******@yahoo.comwrote in message news:fa**********@aioe.org...
>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

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..

Excellent

Thanks pedrito.

JB
Aug 22 '07 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Brian Vallelunga | last post by:
Greetings, I'm attempting to create a tabbed box with CSS and Javascript and am having some problems. I have three tabs and three tab content areas. When the page is loaded, two of the three...
2
by: Stanimir Stamenkov | last post by:
I'm trying to clear some sizing issues relative to the initial containing block and the root document element. The sample document I'm trying with: http://stanio.info/viewport_fill.html ...
10
by: John Baker | last post by:
Hi: I have a user who has labels that are set up 3 across and 11 vertical (which is unusual at best), and he wants me to print names and addresses on them. I have already set up for labels 10...
2
by: chris | last post by:
hi all, i need to create vertical scrollbar dynamically for the controls that are created dynamically in the form. (i'm not adding any controls to the panel). when the form exceeds(coz of...
4
by: Tim Marsden | last post by:
Hi I would like to add controls to my page at runtime. What containers can I use to host the controls? I know I can add them to the form controls collection, but I need to have control on where...
9
by: Max | last post by:
Hello, Using VB.NET, I can activate an application by entering: AppActivate(intProcessID), where intProcessID is the process ID of a running application. Is it possible to set the size and...
5
by: lamxing | last post by:
Hi, I've come across a strange problem with the WinForm's sizing. I've designed a WinForm and it runs fine on my computer and some other PCs. But when I was trying to run the app under some PCs...
1
by: Tom | last post by:
First, I posted a similar request for help in another group and now don't find the posting. Problem with my newsreader perhaps ... but apologies if this appears as a cross posting. My code is...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.