how to adjust or change display waitbar

14 ビュー (過去 30 日間)
Allan III T. Condiman
Allan III T. Condiman 2020 年 3 月 5 日
回答済み: Jayanti 2024 年 12 月 20 日
what code can adjust or display waitbar like from center to top. I like to display my waitbar at top.

回答 (1 件)

Jayanti
Jayanti 2024 年 12 月 20 日
Hi Allan,
I understand you want to display the “waitbar” at top instead of centre. A position vector can be used to determine the exact location and size of the “waitbar” on the screen.
Please take reference from the below code which is displaying the “waitbar” at the top:
function customPositionWaitbar
position = [350, 400, 300, 50]; % [left, bottom, width, height]
% Create the waitbar with a custom position
f = waitbar(0, 'Starting...', 'Position', position);
pause(0.5);
waitbar(0.3, f, 'Loading...');
pause(0.5);
waitbar(0.6, f, 'Processing...');
pause(0.5);
waitbar(1, f, 'Finishing...');
close(f);
end
Please refer to the following documentation link on “waitbar” for your reference:
Hope this will be useful!

カテゴリ

Help Center および File ExchangeApp Building についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by