自定义按钮,上面有动态信息 [英] Custom button with dynamic information on it

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

问题描述

亲爱的所有人,



i我正在尝试建立一个文档管理系统,其中每个文件夹应该代表一个按钮,其中包含一些信息,具体取决于下面提到的不同产品设置部分。新文件夹将由用户的交易号码源创建和重命名,并选择产品,该按钮上的其余信息将从和数据库中检索。



Button应该看起来像File cover,Long Rectangular并且包含05信息,它将根据User的交易号码从数据库中检索。它应该有02种类型的标签。简单地说它应该看起来像办公室里用来放入文件的平面文件封面。



例子

________________

| INCOMPLETE | < - Tag 01此标签可以包含待处理/已结算

| .................... |

| TrX No ........ | < - 用户Feed信息

|客户...... | < - 基于TrX No.的数据库信息

| A / C No ......... | < - 基于TrX No.的数据库信息

| .................... |

| USD 000.00 | < - 基于TrX No.的数据库信息

| .................... |

|删除| < - 标签02等待批准删除

| _____________ |







感谢有人帮我这个请



我尝试了什么:



我一直在设计Forms

Dear All,

i am trying to do a Document Management System where each Folder should represent as a button with couple of information on it depending on different products mention under settings section. New Folders will be created and renamed by the Transaction number feed by the user and selects the product and rest of the information on the button will be retrieved from and database.

The Button should look like the File cover, Long Rectangular and contains 05 information in it which will be retrieved from database based on the transaction Number feed by User. it should have 02 types of tags . simply to say it should look like a Flat file cover used in offices to put in documents.

Example
________________
|INCOMPLETE | <-- Tag 01 This tag can contain Pending/Settled
|....................|
|TrX No........| <-- User Feed Information
|Customer......| <-- Database Information based on TrX No.
|A/C No.........| <-- Database Information based on TrX No.
|....................|
|USD 000.00 | <-- Database Information based on TrX No.
|....................|
|TO DELETED| <-- Tag 02 Awaiting for Approval to delete
|_____________|



Appreciate if some one could help me on this please

What I have tried:

I have been designing the Forms

推荐答案

你会在读取你正在使用的目录时使用a循环。



目录中的每个文件夹创建按钮,文件夹名称为文本

For Each Dir As String在Directory.GetDirectories(c: \Program Files)

*添加按钮

添加按钮名称





然后,您将设置一个事件,以便在事件按钮单击时创建一个新表单,该表单将创建需要新文件夹的新表单。



与...按钮图像,你只需根据msdn

来定义:

Button Class(System.Windows.Forms) [ ^ ]



查看图片



只是为了让你知道,动态创建的按钮/表格可能是一个正确的痛苦 - 因此我没有给码。就像在我脑海中一样 - 一旦你移动第一个表格,就需要动态创建事件。
you would use a for each loop on a read of the directory you are working on.

for each folder in the directory create button with text of folder name
For Each Dir As String In Directory.GetDirectories("c:\Program Files")
*add button
add name of button
etc

You would then set an event to create a new form on event button click that would create the new form with the new folders required.

in relation to the button image, you just define that as per the msdn
check out:
Button Class (System.Windows.Forms)[^]

check image

just to let you know, dynamically created buttons/forms can be a right pain in the arse - hence I've given no code. As in my head - you would need to have dynamically created events once you move passed the first form.


这篇关于自定义按钮,上面有动态信息的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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