From 9ae2e669f657773a7520da6cae0e496159921b0c Mon Sep 17 00:00:00 2001 From: Jacques Grelet <jacques.grelet@ird.fr> Date: Thu, 17 Jan 2008 19:58:05 +0000 Subject: [PATCH] set 'BackgroundColor' propertie on panel handle --- tsg_util/display_QC.m | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) diff --git a/tsg_util/display_QC.m b/tsg_util/display_QC.m index 7b1cdd6..28e9d22 100644 --- a/tsg_util/display_QC.m +++ b/tsg_util/display_QC.m @@ -15,9 +15,23 @@ function display_QC( hGUI, hAxes ) % ------------------------------- tsg = getappdata( hGUI, 'tsg_data'); +% get panel handle +% ---------------- +hdlPanel = findobj(hGUI, 'tag', 'TAG_QC_DISPLAY_PANEL'); + +% get color axes and set 'BackgroundColor' properties of panel handle +% give a transparency effect +% ------------------------------------------------------------------- +bgColor = get(hAxes(1), 'Color'); +set(hdlPanel, 'BackgroundColor', bgColor); + +% and to his chlidren uicontrol +% ----------------------------- +set(findobj(get(hdlPanel,'children'),'style','text'),... + 'BackgroundColor', bgColor) + % set panel visible % ----------------- -hdlPanel = findobj(hGUI, 'tag', 'TAG_QC_DISPLAY_PANEL'); set(hdlPanel, 'visible', 'on'); % get list of keys from hashtable tsg.qc.hash, defined inside @@ -25,10 +39,6 @@ set(hdlPanel, 'visible', 'on'); % ----------------------------------------------------------- qc_list = get(tsg.qc.hash); -% Plot the Salinity with the right color code -% ------------------------------------------- -%bgColor = get(hAxes(1), '); - % iterate (loop) on each key store inside hastable % ------------------------------------------------ for i=1:numel(qc_list) -- GitLab