面板上的3个文本框 - 调整大小问题 [英] 3 textboxes on the panel - resizing issue

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

问题描述

我知道这对你们许多人来说一定是微不足道的。但我正在玩

这个并不能解决它。


我有一个表格,在那个表格上是一个有3个文本框的面板,当我

运行我的程序并最大化表格时,我想根据表格的大小调整我的3个文本框

。每个文本框应该占面板宽度和面板高度的全部高度的33%

。调整面板的大小很容易对接......但这3个文本框正在开车

我疯了。

有什么想法?




---- ==通过Newsfeed.Com发布 - 无限制 - 未经审查 - 安全使用网新闻== ----
http://www.newsfeed.com 世界排名第一的新闻组服务! > 100,000新闻组

--- = 19东/西海岸专业服务器 - 通过加密的总隐私= ---

解决方案

Martin,

我将一个文本框停靠在顶部,将一个文本框停靠到底部并设置

第三个填充。


在Panel的Layout事件中,我将顶部TextBox

的高度设置为面板的1/3高度,我将底部文本框设置为1/3高度

小组。第三个TextBox将自行处理。 (请记住,大多数

数字不容易被3整除,因此我设置高度为

只有两个文本框,并允许中间一个占用松弛。 。)


请记住将每个TextBox的Multiline属性设置为true!


当然,你可以用Left&如果你想要水平

而不是垂直,那就正确。水平方向你可以将Multiline留空。


希望这有帮助

Jay


" Martin Ho" <毫安****** @ 74tech - 点 - com.no-spam.invalid>在消息中写道

news:3f ******** @ 127.0.0.1 ...

我知道这对你们中的许多人来说都是微不足道的。但是我正在玩
这个并不能解决它。

我有一个表单,在那个表单上是一个面板,有3个文本框,当我运行时我的程序并根据表单的大小最大化我希望调整我的3个文本框的形式。每个文本框应占面板宽度的33%,以及面板高度的全部高度。调整面板的大小很容易对接......但这三个文本框正在驱使我疯狂。
任何想法?


- - ==通过Newsfeed.Com发布 - 无限制 - 未经审查 - 安全使用网络
新闻== ---- http://www.newsfeed.com 世界排名第一的新闻组服务! > 100,000
新闻组--- = 19个东/西海岸专业服务器 - 通过加密的总隐私



= ---


呵呵呵呵

我有这样的问题,但我使用的是listview,但控制类型

无所谓。您将要将自己的代码放入面板

_Resize事件,以改变文本框的大小和位置,就像你想要它们一样。我在.Net中尝试了所有类型的东西,这样我就不必这么做了,但最后我不得不......


" ; Martin Ho <毫安****** @ 74tech - 点 - com.no-spam.invalid>在消息中写道

news:3f ******** @ 127.0.0.1 ...

我知道这对你们中的许多人来说都是微不足道的。但是我正在玩
这个并不能解决它。

我有一个表单,在那个表单上是一个面板,有3个文本框,当我运行时我的程序并根据表单的大小最大化我希望调整我的3个文本框的形式。每个文本框应占面板宽度的33%,以及面板高度的全部高度。调整面板的大小很容易对接......但这三个文本框正在驱使我疯狂。
任何想法?


- - ==通过Newsfeed.Com发布 - 无限制 - 未经审查 - 安全使用网络
新闻== ---- http://www.newsfeed.com 世界排名第一的新闻组服务! > 100,000
新闻组--- = 19个东/西海岸专业服务器 - 通过加密的总隐私



= ---

<周杰伦,我不希望他们停靠在最底层并填充...

我希望它们看起来像一个垂直的列,我不想要它们看看

就像一个水平的盒子。


Mike Bulava,请你提供一些关于如何做的小代码

这个?


我真的很感激看到一些例子。

我不知道为什么这么琐碎的东西如此荒谬

复杂。

这应该很容易设置,就像你在html中设计

表时一样......这真是太难了:)


马丁


---- ==通过Newsfeed.Com发布 - 无限制 - 未经审查 - 安全使用网新闻== ----
http://www.newsfeed.com 排名第一的新闻组服务世界! > 100,000新闻组

--- = 19东/西海岸专业服务器 - 通过加密的总隐私= ---


I know this must be trivial for many of you. But I am playing with
this and can''t figure it out.

I have a form, on that form is one panel which has 3 textboxes, when I
run my program and maximize the form I want to resize my 3 text boxes
according to the size of the form. Each text box should take 33% of
the panel''s width and full hight of the panel''s height. Resizing of
the panel is easy with docking... but these 3 textboxes are driving
me crazy.
Any ideas?
Please

----== Posted via Newsfeed.Com - Unlimited-Uncensored-Secure Usenet News==----
http://www.newsfeed.com The #1 Newsgroup Service in the World! >100,000 Newsgroups
---= 19 East/West-Coast Specialized Servers - Total Privacy via Encryption =---

解决方案

Martin,
I would dock one Textbox to the Top, dock one Textbox to the Bottom and set
the third to Fill.

In the Layout event for the Panel I would set the height of the top TextBox
to 1/3 height of the panel, I would set the bottom Textbox to 1/3 height of
the panel. The third TextBox will take care of itself. (Remember that most
numbers are not easily divisible by three, hence my setting the height of
only two text boxes and allowing the middle one to take up the slack...)

Remember to set the Multiline property for each TextBox to true!

Of course you can do the same thing with Left & Right if you want horizontal
instead of vertical. With horizontal you can leave Multiline to false.

Hope this helps
Jay

"Martin Ho" <ma******@74tech-dot-com.no-spam.invalid> wrote in message
news:3f********@127.0.0.1...

I know this must be trivial for many of you. But I am playing with
this and can''t figure it out.

I have a form, on that form is one panel which has 3 textboxes, when I
run my program and maximize the form I want to resize my 3 text boxes
according to the size of the form. Each text box should take 33% of
the panel''s width and full hight of the panel''s height. Resizing of
the panel is easy with docking... but these 3 textboxes are driving
me crazy.
Any ideas?
Please

----== Posted via Newsfeed.Com - Unlimited-Uncensored-Secure Usenet News==---- http://www.newsfeed.com The #1 Newsgroup Service in the World! >100,000 Newsgroups ---= 19 East/West-Coast Specialized Servers - Total Privacy via Encryption


=---


Hehehehe
I had a problem like this but I was using listview but the control type
doesn''t matter. You''re going to want to put your own code in to the panel
_Resize event to change the size and position of the textboxs the way you
want them. I tried all types of things in .Net so that I wouldn''t have to
do that but in the end I had to..

"Martin Ho" <ma******@74tech-dot-com.no-spam.invalid> wrote in message
news:3f********@127.0.0.1...

I know this must be trivial for many of you. But I am playing with
this and can''t figure it out.

I have a form, on that form is one panel which has 3 textboxes, when I
run my program and maximize the form I want to resize my 3 text boxes
according to the size of the form. Each text box should take 33% of
the panel''s width and full hight of the panel''s height. Resizing of
the panel is easy with docking... but these 3 textboxes are driving
me crazy.
Any ideas?
Please

----== Posted via Newsfeed.Com - Unlimited-Uncensored-Secure Usenet News==---- http://www.newsfeed.com The #1 Newsgroup Service in the World! >100,000 Newsgroups ---= 19 East/West-Coast Specialized Servers - Total Privacy via Encryption


=---


Jay, I don''t want them to dock to top bottom and fill...
I want them to look like a vertical columns, I don''t want them to look
like a horizontal boxes.

Mike Bulava, could you please provide some little code on how to do
this?

I would really appreciate to see some example.
I have no idea why something so trivial is so ridiculously
complicated.
This should be easy to setup, the same way as when you designing
tables in html or so... This is just damn hard :)

Martin

----== Posted via Newsfeed.Com - Unlimited-Uncensored-Secure Usenet News==----
http://www.newsfeed.com The #1 Newsgroup Service in the World! >100,000 Newsgroups
---= 19 East/West-Coast Specialized Servers - Total Privacy via Encryption =---


这篇关于面板上的3个文本框 - 调整大小问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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