473,397 Members | 2,077 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,397 software developers and data experts.

dispaly controls in panel

I have a panel on my form and add controls (e.g. TextBox)
into it at runtime.

What I want is the controls will display on same line if
they are visiable in the panel horizontally. If any of
the controls outside panel, it will be displayed to next
line.

Is there any property I can set in the panel to do it?

Thanks

Kieht
Nov 15 '05 #1
3 1600
I think it depends on how your form is configured. Are you using GridLayout
or FlowLayout ?
If you use FlowLayout and don't set fixed width and height of your panel,
the controls should wrap to the next line in case they don't fit.

--
TJoker, MCSD.NET
MVP: Paint, Notepad, Solitaire

****************************************
"keith" <ke*****@shaw.ca> wrote in message
news:05****************************@phx.gbl...
I have a panel on my form and add controls (e.g. TextBox)
into it at runtime.

What I want is the controls will display on same line if
they are visiable in the panel horizontally. If any of
the controls outside panel, it will be displayed to next
line.

Is there any property I can set in the panel to do it?

Thanks

Kieht

Nov 15 '05 #2
How to I know which one for my form (I created an Window
app with all default) and how to change it?

Thanks
Keith
-----Original Message-----
I think it depends on how your form is configured. Are you using GridLayoutor FlowLayout ?
If you use FlowLayout and don't set fixed width and height of your panel,the controls should wrap to the next line in case they don't fit.
--
TJoker, MCSD.NET
MVP: Paint, Notepad, Solitaire

****************************************
"keith" <ke*****@shaw.ca> wrote in message
news:05****************************@phx.gbl...
I have a panel on my form and add controls (e.g. TextBox) into it at runtime.

What I want is the controls will display on same line if they are visiable in the panel horizontally. If any of
the controls outside panel, it will be displayed to next line.

Is there any property I can set in the panel to do it?

Thanks

Kieht

.

Nov 15 '05 #3
Wait a minute .. Windows app ?? I thought you were talking about a ASP.NET
webform :)
Ok, then you'll have to verify programmatically the position and width of
the child controls and move to the next "line" in the panel.
I suggest using private fields to keep track of the current X and Y
coordinates of the last added control. Also, the ControlAdded event might
help you out.

--
TJoker, MCSD.NET
MVP: Paint, Notepad, Solitaire

****************************************
"keith" <ke*****@shaw.ca> wrote in message
news:0f****************************@phx.gbl...
How to I know which one for my form (I created an Window
app with all default) and how to change it?

Thanks
Keith
-----Original Message-----
I think it depends on how your form is configured. Are

you using GridLayout
or FlowLayout ?
If you use FlowLayout and don't set fixed width and

height of your panel,
the controls should wrap to the next line in case they

don't fit.

--
TJoker, MCSD.NET
MVP: Paint, Notepad, Solitaire

****************************************
"keith" <ke*****@shaw.ca> wrote in message
news:05****************************@phx.gbl...
I have a panel on my form and add controls (e.g. TextBox) into it at runtime.

What I want is the controls will display on same line if they are visiable in the panel horizontally. If any of
the controls outside panel, it will be displayed to next line.

Is there any property I can set in the panel to do it?

Thanks

Kieht

.

Nov 15 '05 #4

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

Similar topics

7
by: Bil Muh | last post by:
Esteemede Developers, I would like to Thank All of You in advance for your sincere guidances. I am developing a software using Visual C++ .NET Standard Edition with Windows Form (.NET)...
3
by: Roger | last post by:
Hi In a Windows forms application I have 2 forms A and B; Form B inherits from form A. Form A is never displayed and its only purpose is to be inherited from and therefore contains mostly...
1
by: sleigh | last post by:
Hello, I'm building a web application that will build a dynamic form based upon questions in a database. This form will have several different sections that consist of a panel containing one to...
0
by: mawi | last post by:
Hello, Description: I create panels with some controls on a page using a new panel button. One of the controls on each panel is the "close panel" button that is supposed to close the panel it...
2
by: Michael | last post by:
Need some help trying to read values from web controls - specifically *finding* the controls (like a drop down list) - that are added dynamically added within an asp:panel control. The page...
6
by: dhnriverside | last post by:
Hi peeps, I'm trying to create some controls textboxes at runtime, based on the number of items in a IETreeView that are checked. That I can do, I've got a place holder and I can create the...
4
by: Bass Pro | last post by:
Hi, I am creating textbox, radiobuttonlist and checkboxlist dynamically depending on data from a table. It is a questionnaire. I add the control on a Panel control during the 1st load_page event....
5
by: Ted Ngo | last post by:
protected void Page_Load(object sender, EventArgs e) { if (!Page.IsPostBack) { txtSource.Focus(); frmMain.Visible = true; divWait.Visible = false; btnsubmit.Visible = true;
15
by: rizwanahmed24 | last post by:
Hello i have made a custom control. i have placed a panel on it. I want this panel to behave just like the normal panel. The problem i was having is that the panel on my custom control doesnt...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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: 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
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.