Re: [gtk-list] widgets without user input



Ionutz Borcoman wrote:
> 
> Hi,
> 
> I have a program that uses scrollbars and check buttons to display
> informations from my motherboard (using lm-sensors library). As these
> widgets should be read-only I have "disabled" them to prevent user
> imput. The only problem is that this also greys the widgets. Is it
> posible to only stop user input while keeping the normal colors ?
> 
> I would like something as simple and compact as possible (for disabling,
> I have only one code line :-).

Could you use a progress bar (GtkProgressBar) instead of the scroll bar?
They're similar to scroll bars but for data display rather than data
input.

I would replace the checkbox with something like a GtkHBox containing a
GtkPixmap and GtkLabel i.e.

 ------------------------------------
| GtkHBox                            |
|  -----------   ------------------  |
| | GtkPixmap | | GtkLabel         | |
|  -----------   ------------------  |
 ------------------------------------

You could then create two pixmaps for off and on: a tick and a cross
maybe?

There will be a bit of coding for the checkbox replacement but the end
result will be *much* better than using an insensitive data input
widget.

Cheers, Matt.

-- 
Matt Goodall             |  Isotek Electronics Ltd
email: mgg@isotek.co.uk  |  Claro House, Servia Road
Tel: +44 113 2343202     |  Leeds, LS7 1NL
Fax: +44 113 2342918     |  England



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]