maskedtextbox的问题 [英] problem with maskedtextbox

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

问题描述

我从Windows窗体上的工具箱中拖动了maskedtextbox,但在运行时未显示

i dragged maskedtextbox from toolbox on windows form but it is not displaying at runtime
even visible property is true

推荐答案

Raja(thatraja)在他的评论中给了您一个好主意.我可以解释:即使看不到问题,也很明显:例如,很容易弄乱布局并放开一些控件以离开窗体视图.

这是最可能的原因:您的控件本身或它的父控件可能超出了范围,因为某些无关紧要的原因.也可以尝试以下操作:转到控件的属性,并将其位置设置为(0,0),并为其指定一些任意但合理的大小.如果可以用其他控件覆盖,请尝试放在顶部或移到开放空间.

当您使用它并可以看到发生了什么时,请执行以下操作:更改设计并避免使用Designer使用绝对定位(绝对定位使用某些代码更为合理).相反,应使用属性DockPadding来将所有控件放置在面板中并停靠在一起.所有这些控件.

您可以在这里找到我的简单示例:
Raja (thatraja) gave you a good idea in his comment. I can explain: even though we cannot see the problem, it''s clear: it is easy to screw up the layout and put some control away form view, for example.

This is the most likely reason: your control itself or its parent control can be just beyond the bound, by some reason which does not really matter. Try also this: go to the control''s properties and set its location to (0, 0) and give it some arbitrary but reasonable size. If it can be covered by some other control, either try to put in on top or move to a open space.

When you play with that and can see what''s going on, do the following: change your design and avoid the use of absolute positioning using Designer (absolute positioning uses some code is more reasonable). Instead, all your controls should be places in panels and docked, with the use of the properties Dock and Padding — all of them.

You can find my simple sample here: how to dock button so that it can adjust with the form[^].

Absolute positioning is evil and manual unreliable boring work. Don''t do it.

Can you keep a secret? Here is a hint: most serious part of work in seriously designed UI is done without Designer, believe or not. :-)

—SA


窗口窗体上是否有任何组框控件?它可能会以以下方式进入相同的搜索:-

1)选择表单窗口.
2)选择属性窗口,然后在属性窗口顶部的下拉菜单中找到控件.
3).选择控件后,它将在窗体中突出显示.

如果可以解决您的问题,请接受此作为答案. :)

欢呼

Varun Sareen
Do you have any group box control on your window form?? it might get dropped into that search for the same in the following manner:-

1) Select the form window.
2) The select the properties window and find the control in the drop down on the top of properties window.
3). the moment you select the control it will get highlighted in the form.

accept this as answer if it solves your problem. :)

cheers

Varun Sareen


这篇关于maskedtextbox的问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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