动态表格 [英] Dynamic forms

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

问题描述

有没有人有任何在运行时构建表单的经验?

我有一个需要50多个简单表单的应用程序,它只会被

我使用外观并不重要。


我的想法是将业务对象传递给标准表单并使用反射来确定需要哪些控件,可能使用自定义属性帮助

这个。


有什么想法吗?


欢呼


guy

Has anyone any experience of building a form at run time?
I have an app that will require 50+ simple forms, it will only be used by
me, so appearance isnt important.

My idea is to pass a business object to a standard form and use reflexion to
determine what controls are needed, maybe using custom attributes to help
this.

any thoughts?

cheers

guy

推荐答案

Guy,


您始终在运行时构建表单dotNet ..

大多数情况下,你使用的是继承自

system.control.forms.form的继承表单,但它是在运行时构建的。


您构建的表单总是可以使用,因为它是一个类的wat


在VBNet中

dim frm1 as new myform

dim frm2 as new myform




在C#

myform frm1 = new山羊myf orm();




我希望这有帮助吗?


Cor
Guy,

You are always building a form at run time in dotNet..
Most often you use an inherited form that is inherited from
system.control.forms.form, however it is build at run time.

The form you build can always be used because it is a class by the wat

In VBNet
dim frm1 as new myform
dim frm2 as new myform
etc.

In C#
myform frm1 = new myform();
etc.

I hope this helps?

Cor


你好我知道这个:-)


我打算传递一个表单一个对象,并让表单使用reflexiton

来确定需要哪些控件,我可以使用一个表单并使用

来处理多个业务对象


欢呼


家伙


" Cor Ligthert"写道:
Hi Cor yes i realise this:-)

what i intend is to pass a form an object, and have the form use reflexiton
to determine what controls are needed , thjat way i can have one form and use
it for working with multiple business objects

cheers

guy

"Cor Ligthert" wrote:
盖伊,

你总是在运行时在dotNet中构建一个表单。
大多数情况下,你使用的是一个继承的表单继承自
system.control.forms.form,但它是在运行时构建的。

您构建的表单总是可以使用,因为它是一个类的wat

在VBNet中将昏暗的frm1作为新的myform
dim frm2作为新的myform


在C#
myform frm1 = new myform( );

我希望这有帮助吗?

Guy,

You are always building a form at run time in dotNet..
Most often you use an inherited form that is inherited from
system.control.forms.form, however it is build at run time.

The form you build can always be used because it is a class by the wat

In VBNet
dim frm1 as new myform
dim frm2 as new myform
etc.

In C#
myform frm1 = new myform();
etc.

I hope this helps?

Cor



盖伊,


我不了解你,当你知道需要什么控件时你可以将它们添加到表格中。

将它们添加到表格中。


表单类需要什么反映?


Cor
Guy,

I do not understand you, when you know what controls are needed you can just
add them to the form.

What reflection you need for that from the form class?

Cor


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

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