展开全部
布局里,选绝对定位 ,就可以像CS一样托放.
但是对某些浏览器支持不好,所以一般用table+div定容器位,然后相对定位控件.
但是对某些浏览器支持不好,所以一般用table+div定容器位,然后相对定位控件.
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
web 窗体中的控件是通过
table 或 div + css 来控制位置的,跟windows窗体不一样
你可以先用table 来试试
table 或 div + css 来控制位置的,跟windows窗体不一样
你可以先用table 来试试
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
建议直接写代码 别用那个什么设计器....没前途的
给个例子:
using System;
using System.Text;
using System.Text.RegularExpressions;
using System.Xml;
using System.Drawing;
using System.Collections;
using System.Collections.Generic;
using System.ComponentModel;
using System.Windows.Forms;
using System.Data;
using System.IO;
using System.Net;
using System.Net.Sockets;
using System.Threading;
namespace ClientApp
{
public class ClientForm : Form
{
//ClientForm.Controls
private TextBox ClientListBox = new TextBox();
private Label ServerIpLabel = new Label();
private Button RenewButton = new Button();
public ClientForm()
{
//ClintForm
this.Width = 600;
this.Height = 300;
this.StartPosition = FormStartPosition.CenterScreen;
this.HelpButton = false;
this.MaximizeBox = true;
//ClientListBox
ClientListBox.Width = 500;
ClientListBox.Height = 150;
ClientListBox.Left = 50;
ClientListBox.Top = 20;
ClientListBox.Multiline = true;
ClientListBox.ReadOnly = true;
this.Controls.Add(ClientListBox);
//ServerIPLable
ServerIpLabel.Width = 400;
ServerIpLabel.Height = 30;
ServerIpLabel.Left = 50;
ServerIpLabel.Top = 200;
ServerIpLabel.Text = "The server's IP is:";
this.Controls.Add(ServerIpLabel);
//RenewButton
RenewButton.Width = 100;
RenewButton.Height = ServerIpLabel.Height;
RenewButton.Left = 450;
RenewButton.Top = 200;
RenewButton.Text = "刷新列表";
RenewButton.Click += new EventHandler(this.RenewClick);
this.Controls.Add(RenewButton);
}
public static void Main()
{
Application.Run(new ClientForm());
}
}
}
给个例子:
using System;
using System.Text;
using System.Text.RegularExpressions;
using System.Xml;
using System.Drawing;
using System.Collections;
using System.Collections.Generic;
using System.ComponentModel;
using System.Windows.Forms;
using System.Data;
using System.IO;
using System.Net;
using System.Net.Sockets;
using System.Threading;
namespace ClientApp
{
public class ClientForm : Form
{
//ClientForm.Controls
private TextBox ClientListBox = new TextBox();
private Label ServerIpLabel = new Label();
private Button RenewButton = new Button();
public ClientForm()
{
//ClintForm
this.Width = 600;
this.Height = 300;
this.StartPosition = FormStartPosition.CenterScreen;
this.HelpButton = false;
this.MaximizeBox = true;
//ClientListBox
ClientListBox.Width = 500;
ClientListBox.Height = 150;
ClientListBox.Left = 50;
ClientListBox.Top = 20;
ClientListBox.Multiline = true;
ClientListBox.ReadOnly = true;
this.Controls.Add(ClientListBox);
//ServerIPLable
ServerIpLabel.Width = 400;
ServerIpLabel.Height = 30;
ServerIpLabel.Left = 50;
ServerIpLabel.Top = 200;
ServerIpLabel.Text = "The server's IP is:";
this.Controls.Add(ServerIpLabel);
//RenewButton
RenewButton.Width = 100;
RenewButton.Height = ServerIpLabel.Height;
RenewButton.Left = 450;
RenewButton.Top = 200;
RenewButton.Text = "刷新列表";
RenewButton.Click += new EventHandler(this.RenewClick);
this.Controls.Add(RenewButton);
}
public static void Main()
{
Application.Run(new ClientForm());
}
}
}
本回答被提问者采纳
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询