How to select multiple edit fields?
4 views (last 30 days)
Show older comments
Hi,
In my user interface, users can specify a dimension, for exam m x n, then I draw a m x n table, where each element is an edit field such that users can change values in any edit field.
% Horizontal margin of the canavas
hMargin = 0.02;
% Vertical margin of the canavas
vMargin = 0.02;
% Element width
elemWidth = min((1-2*hMargin) / n, (1-2*vMargin)/m);
% Create an edit field for each entry
for j = 1 : m
for i = 1 : n
pos = [hMargin+(j-1)*elemWidth 1-vMargin-i*elemWidth elemWidth elemWidth];
e = uicontrol('Style','edit',...
'Units','normalized',...
'Position',pos);
end
end
But sometimes, users might want to have a row with same values:

for example in the image, users will have to change the values on row 5 one by one from 0.5 to 1.
Is there a way to have something like a brush, that for the places with the same values, after modifying one edit field, the others can be simply "brushed" to have the same values? Or is there a way that users can jump between each edit field with the arrow keys (currently they always have to use a mouse to select)?
Thank you very much!
Answers (0)
See Also
Categories
Find more on Descriptive Statistics 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!