Cancel
Showing results for 
Search instead for 
Did you mean: 

Dialog - Data Type of Edit Text Box via SimTalk

Gears Phenom Gears Phenom
Gears Phenom

Hello all.

 

I work a lot on generating my dialogs by SimTalk, I find this personally easier to work with and also enables me to quickly use a previous dialog as a template for the current one, but a feature is missing from what I can see.

 

Is there a way to set the 'Data Type' of a Edit Text Box through SimTalk?

 

You can set if you make the dialog normally through right click commands, and it will restrict what the user can enter into the text box to what is set.

 

JamesM

2 REPLIES

Re: Dialog - Data Type of Edit Text Box via SimTalk

Siemens Phenom Siemens Phenom
Siemens Phenom

There is an undocumented method:

Dialog.setEditType(ItemName: string, Type:integer)

 

The Type is the number of the drop-down list item to set. We will change this in the future, so that you can assign a string with the text of the drop-down list item. Setting an integer value will then still work (at least for some time), but we will not guarantuee that the numbering stays the same forever.

_________________________________________________________________
Did you like the answer? Then click the Thumbs Up button.
Did the answer solve your problem? Then accept the answer as solution.

Re: Dialog - Data Type of Edit Text Box via SimTalk

Gears Phenom Gears Phenom
Gears Phenom

Hello

 

Can confirm that this works, as it stands for V13.0.0 the Type numbers are as followed:

1

Any Character

2

Letters and Digits

3

Letters

4

Decimal Number

5

Signed Decimal Number

6

Hexadecimal Number

7

Octal Number

8

Binary Number

9

Floating Point Number

10

Time

11

Date with Time

12

Date

13

Positive Real Number

 

JamesM