フィルターのクリア

Is it possible to change the tab color and font of a uitabgroup's tabs?

51 ビュー (過去 30 日間)
matlabuser77
matlabuser77 2023 年 12 月 15 日
回答済み: atharva 2023 年 12 月 15 日
Is it possible to change the color of a uitabgroup's tabs as well as the font and font color? If not, is it possible to adjust the border color of the uitabgroup?
It is possible to change the background color of each tab's pane, but I do not see a way to adjust the color or font/font color of the bar or the tab name elements on it. I am on R2023b.

回答 (1 件)

atharva
atharva 2023 年 12 月 15 日
Hey matlabuser77,
I understand that you want to know if it is possible to change the color of a uitabgroup's tabs as well as the font and font color and If not, is it possible to adjust the border color of the uitabgroup.
Yes, it is possible to adjust the border color of a uitabgroup in MATLAB. You can use the 'BorderType' property to set the type of border and the 'BorderColor' property to set the color of the border. Here's an example:
h = uitabgroup;
set(h, 'BorderType', 'line', 'BorderColor', 'red');
You can use the 'ForegroundColor' and 'BackgroundColor' property to change the font color the tabs respectively.
You can go through the official Mathworks documentation below to understand more about 'ForegroundColor'
You can change the font and font size for the title of a uitab by using the HTML formatting inside the "Title" property of the uitab. Here's an example to set the font size and font of a uitab to "12" and "Helvetica" respectively using HTML formatting:
>> tabGroup = uitabgroup(f);
>> % Use HTML formatting to specify font size
>> tab = uitab(tabgp, 'Title', '<html><font size="12">Tab 1</font></html>');
>> % Use HTML formatting to specify font face
>> tab = uitab(tabGroup, 'Title', '<html><font face="Helvetica">Tab 1</font></html>');
I hope this helps!

カテゴリ

Help Center および File ExchangeMigrate GUIDE Apps についてさらに検索

タグ

製品


リリース

R2023b

Community Treasure Hunt

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

Start Hunting!

Translated by