Jump to content
Developer Wiki and Function Reference Links Read more... ×
Sam Jones

Get value when leaving a dialog edit text box.

Recommended Posts

Is there a way to get the value of an edit text box when someone leaves that box.  This is easily done with GetItemText(), but I only want to do this when I am leaving a field.  I cannot check the field when the its component ID is returned by the Dialog Handler, because that ID is returned after every key press in the field.  I want to collect the value of the field when a user tabs out of that field, not before.

Share this post

Link to post

Check when the item does not equal the ID?


If you want to be more precise, set a global to true when item = ID.  When the variable is true and item <> ID, the user left the text box.

Share this post

Link to post

I made the description too simple.  I have 9 "BoxID"s with an text edit box for each one.  When a value is entered into BoxID 1 I want to retrieve the entry and enter the value into each of the remaining higher numbered boxes, but only if the values in those boxes equals "". I want to do the same thing for the remaining text edit boxes.  This means that I don't have just one item ID to compare to, and which box it is will vary.

I imagine that some version of what you describe will have to be my solution, but my first thoughts along these lines proved to not work even before implementation.  I'll keep plugging along.  I had hoped there was some call that would allow treating text edit boxes in dialogs the same as edit boxes in the OIP.  In the event loop, I only get an item specific event when the user leaves the field.

Oh well.

Share this post

Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now


7150 Riverwood Drive, Columbia, Maryland 21046, USA   |   Contact Us:   410-290-5114


© 2018 Vectorworks, Inc. All Rights Reserved. Vectorworks, Inc. is part of the Nemetschek Group.