Re: Buttons in Widgets [message #80555 is a reply to message #80553] |
Mon, 25 June 2012 09:41   |
Michael Galloy
Messages: 1114 Registered: April 2006
|
Senior Member |
|
|
On 6/25/12 3:54 AM, Helder wrote:
> Hi,
> I'm don't like that much how the buttons of IDL widgets look (Widget_button) even when using the /bitmap argument. I am exploring the solution of using a draw_widget, making it of the same color as the background(*) and then filling it is with my own drawing. The difference between the two methods is that the borders of the buttons will appear different: for a button widget these are defined by the IDL and for a draw widget one can have "no" borders or define how these look like. Another advantage is that one can have the effect of having an something like an icon floating on a background.
> Has anybody tried doing such things? So far it seems to do the job for me, but I haven't played too much with it yet.
> (*) Is there a way to find out what color the base widget has and/or to define it?
>
> Cheers,
> Helder
>
You can't change the colors, but you can query with:
IDL> tlb = widget_base()
IDL> colors = widget_info(tlb, /system_colors)
IDL> help, colors
** Structure WIDGET_SYSTEM_COLORS, 25 tags, length=150, data length=150:
DARK_SHADOW_3D INT Array[3]
FACE_3D INT Array[3]
LIGHT_EDGE_3D INT Array[3]
LIGHT_3D INT Array[3]
SHADOW_3D INT Array[3]
ACTIVE_BORDER INT Array[3]
ACTIVE_CAPTION INT Array[3]
APP_WORKSPACE INT Array[3]
DESKTOP INT Array[3]
BUTTON_TEXT INT Array[3]
CAPTION_TEXT INT Array[3]
GRAY_TEXT INT Array[3]
HIGHLIGHT INT Array[3]
HIGHLIGHT_TEXT INT Array[3]
INACTIVE_BORDER INT Array[3]
INACTIVE_CAPTION
INT Array[3]
INACTIVE_CAPTION_TEXT
INT Array[3]
TOOLTIP_BK INT Array[3]
TOOLTIP_TEXT INT Array[3]
MENU INT Array[3]
MENU_TEXT INT Array[3]
SCROLLBAR INT Array[3]
WINDOW_BK INT Array[3]
WINDOW_FRAME INT Array[3]
WINDOW_TEXT INT Array[3]
Mike
--
Michael Galloy
www.michaelgalloy.com
Modern IDL: A Guide to IDL Programming (http://modernidl.idldev.com)
Research Mathematician
Tech-X Corporation
|
|
|