Add textbox to form when clicking a button

Add textbox to form when clicking a button

dialunau
Advocate Advocate
432 Views
3 Replies
Message 1 of 4

Add textbox to form when clicking a button

dialunau
Advocate
Advocate

Hello,

I want to add new elements to a form (textboxes, labels, etc.) by clicking an existing button in my form so the form resizes for the new textboxes to fit. I would like to do this so I don't have to define the code for every textbox, so I can add any number of elements.

 

How can I do this?

 

Thank you in advance.

0 Likes
433 Views
3 Replies
Replies (3)
Message 2 of 4

dialunau
Advocate
Advocate

Dos anyone know how to do this?

0 Likes
Message 3 of 4

HermJan.Otterman
Advisor
Advisor

hello Dialunau, best way I think is to use a VB.net form, there you have all the flexibility that you want (and can't in and iLogic form). look at this link: https://adndevblog.typepad.com/manufacturing/2013/06/use-vbnet-dialog-in-ilogic.html this is a verry nice example by Xiaodong Liang

If this answers your question then please select "Accept as Solution"
Kudo's are also appreciated Smiley Wink

Succes on your project, and have a nice day

Herm Jan


Message 4 of 4

WCrihfield
Mentor
Mentor

Just adding a few more links in here to more resources related to vb.net and Windows Forms.  The first one is an article I wrote a couple years ago, which does not require Visual Studio or any DLL files to be able to test or use it.  The others are direct links to Microsoft's source documentation for the main objects involved.  Lots of good info in there to get you up to speed, if you are not that familiar with this process.

Create a Windows Form, Display It, Get Instant Feedback From Your Choices, all from one iLogic Rule. 

System.Windows.Forms Namespace

Form Class

TextBox Class

Button Class

 

Wesley Crihfield

EESignature

(Not an Autodesk Employee)

0 Likes