Call back a line from edit text box
Show older comments
Hi,how can I call back a line from an edit text box which gatter datas(trough a push button with sprintf) from multiple edit text boxes with a push button in guide. Practically I want to callback datas back to their original edit boxes...
8 Comments
Jan
on 22 May 2022
I do not understand the question. "Data" is nothing that can be called. Only functions can be called.
Cristian Martin
on 22 May 2022
Cristian Martin
on 22 May 2022
dpb
on 22 May 2022
Sounds like a really busy and difficult-to-use interface. Can't you simplify the design somehow?
But, in general you write new data to the control 'String' property using the same object handle you use to read it when you subsequently "send" that data to the master.
There is only one 'String' property value for the control; when you update it, you will replace whatever is there with the new data. It you want to append something else onto an existing data string in a control, you have to retrieve the current value, edit/append the new to it and then rewrite the 'String' value with the new, edited text.
This is certainly doable, but is a fair amount of effort to code and undoubtedly will be difficult to keep everything in synch with everything completely independent and uncorrelated like this.
I'd think either one or two tables or listboxes or even popupmenus that you add/subtract elements from would be a simpler alternative to the user.
But, we can't visualize what you're triying to control/interface to here...
Jan
on 23 May 2022
"how can I do to not overwrite datas?" - it is less useful, if you mention, what you not want to do. Prefer to define, what you want to do instead: append the values? Build the mean of old and new values? Store the old values such that an "undo" button can reset them?
If the combines edit box contains the values as a comma separated string, split them (e.g. by strsplit) and set the original edit fields in a loop.
Actually it sounds like the data are represented redundantly in the GUI. This sounds confusing. Are you sure, that this is the easiest way?
If you post your code, it is much easier to provide some code as an answer. Inventing the code to create the original edit boxes at first would be tedious...
Cristian Martin
on 23 May 2022
Cristian Martin
on 23 May 2022
Cristian Martin
on 23 May 2022
Answers (0)
Categories
Find more on Environment and Settings in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!