473,769 Members | 4,909 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Controls of Panel Layout problem

JimWu
14 New Member
Do anyone know how to layout in Panel control.

The code as follows

Expand|Select|Wrap|Line Numbers
  1.  
  2.  labels[0].Text = "Album Name :";
  3.  labels[1].Text = "Title :";
  4.  labels[2].Text = "Tag :";
  5.  labels[3].Text = "Description :";
  6.  textboxs[0].Text = "";
  7.  textboxs[1].Text = _fileName;
  8.  textboxs[2].Text = "";
  9.  textboxs[3].Text = "";
  10.  
  11.   images.ImageUrl = "./jpgs/" + a.getFileWithoutExt() + "_small.jpg";
  12.  
  13.  
  14.   panels[_iFile].Controls.Add(labels[0]);
  15.   panels[_iFile].Controls.Add(droplists[0]);
  16.   panels[_iFile].Controls.Add(new LiteralControl("<a href='#' onclick='popup();'>add</a>"));
  17.   panels[_iFile].Controls.Add(new LiteralControl("<br>"));
  18.  
  19.   panels[_iFile].Controls.Add(labels[1]);
  20.   panels[_iFile].Controls.Add(droplists[1]);
  21.   panels[_iFile].Controls.Add(new LiteralControl("<a href='#' onclick='popup();'>add</a>"));
  22.   panels[_iFile].Controls.Add(new LiteralControl("<br>"));
  23.  
  24.   panels[_iFile].Controls.Add(labels[2]);
  25.   panels[_iFile].Controls.Add(textboxs[ 2]);
  26.   panels[_iFile].Controls.Add(new LiteralControl("<br>"));
  27.  
  28.  panels[_iFile].Controls.Add(labels[3]);
  29.   panels[_iFile].Controls.Add(textboxs[3]);
  30.   panels[_iFile].Controls.Add(new LiteralControl("<br>"));
  31.  
  32.   panels[_iFile].Controls.Add(images[_iFile]);
  33.  
  34.    form.Controls.Add(panels[_iFile]);
  35.  
  36.  
I wander to know how to layout in Panel's inside sub controls such as textBox, Label and etc.

Since we add a new control to the panel, the controls is so closing next incoming new control.

So I want to use like Css apperence to my page.


Cound anyone know how to use formatted layout in my page.

Thanks for any kindly help.

Jim.
Aug 29 '07 #1
2 1491
Plater
7,872 Recognized Expert Expert
If this is a web application, none of that code matters to your layout in a sense.
You can just use CSS to control where they go.
Aug 29 '07 #2
JimWu
14 New Member
Thanks for your kindly answer.

Now, I know how to show my wanted page.



If this is a web application, none of that code matters to your layout in a sense.
You can just use CSS to control where they go.
Aug 30 '07 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

2
1548
by: F. GEIGER | last post by:
I often use Notebook to structure my GUIs. Sometimes I have to provide a Settings page. Doing changes in this page influences other pages in such a way, that some controls have to change add or remove children or even have to be removed from the page at all. Yet I could not come up with a solid pattern how to do this. I tried to call DestroyChildren(), delete all ref's to them, and to set the page's sizer to None. This doesn't work very...
0
1132
by: AinO | last post by:
Hi, (VS2003/c# - System.Windows.Forms) I have two panels on a parent panel, where one is docked top and the second docked client area. They both have their Visible property = false at design time. On the second panel there are some buttons, a combobox and a label (these have their Visible property always set to true). Now at run time, when these panels need to be shown to the user, their Visible properties are set to true and they show,...
2
1455
by: KatB | last post by:
Hi, Am I missing something re: the panel control? I finally have a use for it, but when I put other controls into it, they squish up (yes, technical term!), and I can not move them into other positions. ??? Thanks, Kat
3
2362
by: Dave | last post by:
I am designing a web page using VS2003 ASP.NET. The page contains various DIVs (panels), one of which is in grid layout. The controls in this DIV render correctly in IE, but when using Firefox they are incorrectly positioned. VS sets the positioning of the controls to absolute, and because the DIV is to the right of another DIV Firefox (correctly, I suspect) positions the controls absolutely, which means they are too far to the left, while...
7
5153
by: astro | last post by:
I am not farmilar with the object model for webforms. I want to loop through the web form controls - pulling out the checkboxes on the form like the following: For Each ctrl In Me.Controls If TypeOf ctrl Is CheckBox Then 'do something here.....
15
6521
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 accept other controls. The control i drag drop on it becomes the child of my custom control's parent form and not the child of my custom control. Then i added this line "" before my custom control class (i dont know what this line does). Now
2
2827
by: Rob | last post by:
I am not sure if this can be implemented.... There exists a TabContol (added at design time) to a form.. Tabs for this TabContol get added at run time. Usage of the following 2 properties works quite welll in order to reference the control. Public Property TabControlAvailable() As TabControl
3
1794
by: =?Utf-8?B?RnJhbmsgVXJheQ==?= | last post by:
Hi all It is maybe a stupid question, but I have some trouble with Inheritance. For example: I create a new class with one form. On this form I place on the bottom a Panel and on this Panel on the right side a button. On both controls I set Anchor (bottom, right).
32
2792
by: =?Utf-8?B?U2l2?= | last post by:
I have a form that I programmatically generate some check boxes and labels on. Later on when I want to draw the form with different data I want to clear the previously created items and then put some new ones on. In my code I am doing the following: For Each ctrl In tpMain.Controls If TypeOf (ctrl) Is CheckBox Then If ctrl.Name.StartsWith("chkS") Then ctrl.Visible = False
0
9586
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
1
9990
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8869
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7406
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6672
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5298
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5446
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3956
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3561
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.