What's new

Can I add explanatory text to an option box?

albie0803

Alibre Super User
Something like this for example

option 1: Enter Height
option 2: Enter Width
Text: You need to consider this before entering option 3
option 3: Enter Length
 
Yes.

Code:
Options.append([None, WindowsInputTypes.Label, 'Foo'])

Andy
Andy -- Could you format your reply to include Albie's "Option" layout? I suspect that it can be "figured out" from your posing, but a specific example would help.
 

ajayre

Alibre Super User
The example code I gave can be copied and pasted into all of the included examples that use dialogs.

Andy
 

albie0803

Alibre Super User
I get this:
upload_2018-10-22_7-13-5.png
I understand, basically, why, but can I get the labels to show with the other text?

Default layout:
upload_2018-10-22_7-16-34.png

Alternate layout:
upload_2018-10-22_7-23-7.png
 

Attachments

  • upload_2018-10-22_7-21-25.png
    upload_2018-10-22_7-21-25.png
    8.2 KB · Views: 5

albie0803

Alibre Super User
A trap for young players:

option 1: Enter Height
option 2: Enter Width
Text: You need to consider this before entering option 3
option 3: Enter Length

when you read the values for this you need to read:

Height = Values[0]
Width = Values[1]
Textline = Values[2]
Length = Values[3]

NOTE: the text line is actually an option!
 

oldfox

Alibre Super User
Albie, I made a change in my code because it was confusing me.
Length of the key = "Length"
Distance from Ref to End of keyseat = "Distance"
Using the word "Length" for both was the confusing issue.
Your window is looking good.
Here's my latest script. There are, as just mentioned, some minor changes.
 

Attachments

  • Work Shaft.AD_PRT
    509.5 KB · Views: 3

albie0803

Alibre Super User
The comments are squashed into the same column as the input text boxes. As you can see, if I widen the text boxes, the comment text spreads out. I want the comment text "Enter values below from your model" to be in the same column as Shaft Edge: Edge<?> and I want small text boxes like in the top picture.
 
Top