User guide |
The usual use of defaults is to modify the colors, fonts or
other settings used for a particular application window. The defaults
are therefore changed on the figure object using the uiextras.set
function.
The example below sets new defaults for panel title-bar color and font on the window before two panels are added.
f =figure
();uiextras.set
( f,'DefaultHBoxBackgroundColor'
, [0.3 0.3 0.3] );uiextras.set
( f,'DefaultBoxPanelTitleColor'
,'y'
);uiextras.set
( f,'DefaultBoxPanelFontSize'
, 16 ); h =uiextras.HBox
('Parent'
, f,'Padding'
, 10,'Spacing'
, 10 ); p1 =uiextras.BoxPanel
('Parent'
, h,'Title'
,'Panel 1'
); p2 =uiextras.BoxPanel
('Parent'
, h,'Title'
,'Panel 2'
);
Using property defaults | [Top] | Setting defaults for all windows |