scroll bar does not work when dialog box appears in app designer

3 visualizaciones (últimos 30 días)
MakM
MakM el 18 de Abr. de 2022
Respondida: Voss el 18 de Abr. de 2022
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

Respuesta aceptada

Voss
Voss el 18 de Abr. de 2022
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

Más respuestas (0)

Categorías

Más información sobre Environment and Settings en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by