CheckedListbox自动调整大小。 [英] CheckedListbox Auto resizing.

查看:815
本文介绍了CheckedListbox自动调整大小。的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在表格上有2个checkedlistbox。如何在调整大小时根据表单大小调整大小。

I have 2 checkedlistbox on form. How can I resize them according to form size while form resizing.

推荐答案

1。在表单中添加splitcontainer控件 - >将其对接设置为填充。



2.在左侧面板中放置一个分割控件并将其对接设置为右侧并将光标设置为默认值并禁用它。 br />


3.在右侧面板中放置一个分割控件并将其对接设置为Left并将光标设置为默认值并禁用它。



4.现在将列表框放在两个面板中并设置对接以填充然后你将得到你想要的东西。



希望这个也许有帮助。

谢谢。
1. In the form add a splitcontainer control -> set its docking to fill.

2. Place one split control in the Left side panel and set it docking to right and set the cursor to default and disable it.

3. Place one split control in the right side panel and set it docking to Left and set the cursor to default and disable it.

4. now place the list boxs in both panels and set the docking to fill then you will get what you wanted.

Hope this may help.
Thanks.


您需要更改 Anchor 属性(在设计中),例如顶部,底部,左侧,右侧



如果控件在面板中,您还需要对面板执行此操作(还需要调整大小)



根据控件的位置,在调整窗体大小时可能会出现一些重叠 - 在这种情况下,您需要使用窗体的MinimumSize和MaximumSize属性进行播放和/或checkedListBox



在调整表单大小时你想做的任何其他事情都可以添加到

You need to change the Anchor property (in Design) e.g. To Top, Bottom, Left, Right

If the controls are in a panel you will also need to do this to the Panel (it will need to resize as well)

Depending on the positioning of the controls you may get some overlapping when the form is resized - in which case you need to play about with MinimumSize and MaximumSize properties of the form and/or checkedListBox

Anything else you want to do when the form is resized could be added to the
private void Form1_Resize(object sender, EventArgs e)

event


如果我有单个列表,它是可行的。 bt我有两个,我不能将这个属性设置为同一个面板中的两个列表
It is posible if I had single list. bt I have two and I can''t set this prperty for two list in same panel


这篇关于CheckedListbox自动调整大小。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆