scroll bar does not work when dialog box appears in app designer
5 次查看(过去 30 天)
显示 更早的评论
I am attaching the code, which is used to read the text files from the directory. whenever the dialog box appears the scroll bar as shown in the image freezes, is there any way i can scroll the text file names along with the dialog box open. Image and code attached.
properties (Access = private)
txt_files
txt_DIR
txt_file_bas
end
methods (Access = private)
% Button pushed function: UploadFilesButton
function UploadFilesButtonPushed(app, event)
app.txt_DIR = 'C:\Users\Windows 10\Documents\samples\';
app.txt_files = dir([app.txt_DIR '*.txt']);
b={app.txt_files(:).name}';
app.TextArea.Value=app.txt_DIR ; % Sets the label text to be the selected path
b(ismember(b,{'.','..'})) = []; % Removes unnecessary '.' and '..' results from the display.
for txt_i = 1:length(app.txt_files)
s_no{txt_i}=(txt_i);
end
s_no=s_no';
app.UITable.Data=[s_no b]; % Displays the directory information to the UITable.
txt = inputdlg('Enter text value',...
'Enter text value', [1 50]);
end
% Value changed function: TextArea
function TextAreaValueChanged(app, event)
value = app.TextArea.Value;
end
end
0 个评论
采纳的回答
Voss
2022-4-18
inputdlg creates a modal dialog box. "Modal" means that no other window can be interacted with while the modal window is up.
To allow interacting with other windows while the inputdlg window is up, you can make the inputdlg non-modal:
txt = inputdlg( ...
'Enter text value', ... % prompt
'Enter text value', ... % title
[1 50], ... % dimensions of edit field
{''}, ... % default answer
struct('WindowStyle','normal')); % options
0 个评论
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Environment and Settings 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!