473,387 Members | 1,504 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,387 software developers and data experts.

repainting controls

I am having a bad day here. All I want to do is resize a ComboBox at
runtime.

senderComboBox.DropDownWidth = width;

senderComboBox.Width =width + vertScrollBarWidth;

senderComboBox.Invalidate();

This is not working and only resizes when i click on the dropdown itself,
can someone comment what I may be doing wrong ?
--
Mr newbie
Nov 17 '05 #1
1 1045
Hi there... why don't you try setting the anchor property of the combobox to

this.comboBox1.Anchor =
((System.Windows.Forms.AnchorStyles)((System.Windo ws.Forms.AnchorStyles.Left
| System.Windows.Forms.AnchorStyles.Right)));

Regards,
--
Angel J. Hernández M.
MCP - MCAD - MCSD - MCDBA
http://groups.msn.com/desarrolladoresmiranda
http://www.consein.com
"Newbie" <he**@now.com> escribió en el mensaje
news:e1*************@TK2MSFTNGP14.phx.gbl...
I am having a bad day here. All I want to do is resize a ComboBox at
runtime.

senderComboBox.DropDownWidth = width;

senderComboBox.Width =width + vertScrollBarWidth;

senderComboBox.Invalidate();

This is not working and only resizes when i click on the dropdown itself,
can someone comment what I may be doing wrong ?
--
Mr newbie

Nov 17 '05 #2

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

Similar topics

2
by: Hal Vaughan | last post by:
I have a "wizard" type program with a series of panels that are placed in a JPanel. When the "Next >" button is pressed, I put in a new panel (in other words, the ActionListener for "Next >"...
0
by: Phil | last post by:
I have a .net/C# com object that creates a thread and a window to output results obtained in the thread (the thread is reading a com port). Everything seems to be working correctly (I don't get any...
0
by: Mike Richardson | last post by:
Hello, I am using VB.net. Is there a way to stop the screen from repainting. I would perfer to stop screen repainting for the entire application. Example when a form is loading. Stop...
2
by: Phil | last post by:
I have a .net/C# com object that creates a thread and a window to output results obtained in the thread (the thread is reading a com port). Everything seems to be working correctly (I don't get any...
4
by: Alan Lambert | last post by:
Hi, I'm making various changes to the controls on a form and the form flickers as images are loaded etc. Is there a way to stop the form showing the updates until they have been completed? e.g....
2
by: Geraldine Hobley | last post by:
Hello, In my application I am trying to load up some forms, however the loading of the forms is causing a lot of flickering. Are there any commands that can stop showing the repainting of the forms...
6
by: rs | last post by:
I wonder, performance wise, if it is better to have one form and repaint the components on that form or to have mutiple forms and show and dispose them? Thanks
5
by: Jesse Aufiero | last post by:
Hello all, I have many buttons on a form and at the bottom of the form is a grid that behaves as though it is 'retractable' - at various times during the life of the app, the grid becomes taller...
6
by: Scott | last post by:
I have a unbound MS graph object built as a pie chart that I set to a value list and I am updating programatically. Everything works except that the graph does not repaint except for when the...
2
by: vunet.us | last post by:
Please, explain an interesting phenomenon, if you can. I have an array of references to an HTML element: <div id='container'> <div id='someId1'></div> <div id='someId2'></div> </div> ........
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: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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,...

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.