Changing of Panel Border Color

50 ビュー (過去 30 日間)
Mathias Gießler
Mathias Gießler 2022 年 2 月 1 日
移動済み: Adam Danz 2023 年 3 月 17 日
Hi,
is it possible to change the border color of a panel?
I tryed
app.Panel.HighlightColor = 'g';
but I get the warning "Functionality not supported with figures created with the uifigure function. For more information, see Graphics Support in App Designer."
In the support text, I not found a solution. Is there a way to change the color?
Kind regards.

採用された回答

Geoff Hayes
Geoff Hayes 2022 年 2 月 1 日
@Mathias Gießler - from Panel Properties, it says something similar: This property is valid only for panels in apps created using the figure function. So if you were to create the panel for a figure rather than a uifigure, then this would work. i.e.
fig = figure;
p = uipanel(fig);
p.Title = 'Display Options';
p.HighlightColor = 'r'
So no, I don't think that you can change the highlight color due to the way the app is created. You can change the BackgroundColor and ForegroundColor though.
  1 件のコメント
Martin Tarlie
Martin Tarlie 2022 年 6 月 8 日
It would be really, really handy from a UI perspective to be able to change the HighlightColor when the parent is a uifigure. Any idea as to how technically challenging this is, and whether or not a change is in the works?

サインインしてコメントする。

その他の回答 (1 件)

Max Kehrer
Max Kehrer 2023 年 3 月 16 日
移動済み: Adam Danz 2023 年 3 月 17 日
@Martin Tarlie R2023a finally introduced the uipanel property 'BorderColor' which replaces 'HighlightColor' (See Panel Properties version history).
In my opinion this was already highly overdue because they just took away the functionality for years without a replacement until now.

カテゴリ

Help Center および File ExchangeDevelop uifigure-Based Apps についてさらに検索

タグ

製品


リリース

R2020a

Community Treasure Hunt

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

Start Hunting!

Translated by