Skip to content

Commit e51a29b

Browse files
committed
Add tooltip message for warning symbol
1 parent 7611519 commit e51a29b

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

widgets/+wt/FileSelector.m

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -177,6 +177,17 @@ function update(obj)
177177
showWarn = strlength(obj.Value) && ~obj.ValueIsValidPath;
178178
obj.WarnImage.Visible = showWarn;
179179

180+
% Set tooltip
181+
if showWarn
182+
if obj.SelectionType == "file"
183+
obj.WarnImage.Tooltip = 'File does not exist.';
184+
elseif obj.SelectionType == "putfile"
185+
obj.WarnImage.Tooltip = 'Folder for file storage does not exist.';
186+
else
187+
obj.WarnImage.Tooltip = 'Folder does not exist.';
188+
end
189+
end
190+
180191
% Update button appearance
181192
obj.ButtonControl.Text = obj.ButtonLabel;
182193
if strlength(obj.ButtonLabel)

0 commit comments

Comments
 (0)