Fusion API and Scripts
Got a new add-in to share? Need something specialized to be scripted? Ask questions or share what you’ve discovered with the community.
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Bug related to display of TextBoxCommandInput

Message 1 of 3
181 Views, 2 Replies

Bug related to display of TextBoxCommandInput

In  the CommandCreated event handler of an add-in I put the few lines of code shown below to create 3 identical text boxes, all 10 rows high (just using the standard add-in framework provided by default).  When run, the first of the three boxes appears noticeably larger in height than the other two. Puzzling.
More puzzling is that if the id of the first text box is changed from 'anyId' to 'WTFId', then the three text boxes are all the same size, as expected.
Further probing reveals that if the number of rows is 1 then the text boxes appear all the same size as expect even with the id 'anyId'. With 2 or more rows the unexpected deviation in height shows up.
Trying a few different id's reveals that others, for example 'setupAttribsId' also suffer from the puzzling height anomaly. Yet other id's, for example 'dataAttribsId' work fine.
Same behavior on Windows and MacOS. Perhaps somehow an hash key on id inadvertently influences the actual TextBoxCommandInput height?
Please let me know if I'm overlooking something and this is somehow expected behavior.
rows = 10
textField = inputs.addTextBoxCommandInput('anyId', '', '', rows, False)
textField.isFullWidth = True
textField = inputs.addTextBoxCommandInput('fooId', '', '', rows, False)
textField.isFullWidth = True
textField = inputs.addTextBoxCommandInput('barId', '', '', rows, False)
textField.isFullWidth = True
Message 2 of 3
in reply to: SendItCNC

This is very strange and I can reproduce the problem. It's hard to imagine what's going on internally where the ID would impact this. I'll make sure a bug is filed.

Brian Ekins
Inventor and Fusion 360 API Expert
Message 3 of 3
in reply to: BrianEkins

Brian, thanks. I appreciate you duplicating this. I was beginning to wonder if I was just missing something really fundamental. -Dave

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk DevCon in Munich May 28-29th

Autodesk Design & Make Report