Re: Hscale
- From: Ronald Bultje <rbultje ronald bitfreak net>
- To: gtk-list gnome org
- Cc: Valery Avaux <vavaux ulb ac be>
- Subject: Re: Hscale
- Date: Tue, 3 Apr 2001 22:31:02 +0200
On 2001.04.03 20:45:38 +0200 Valery Avaux wrote:
> Hello,
> I'm trying to configure one scrollbar. I need to get the current value
> of the scrollbar so I have put signal handler with "value_changed" like
> this:
>
> gtk_signal_connect (GTK_OBJECT 5GTK_RANGE(temper) -> adjustment),
> "value_changed",, GTK_SIGNAL_FUNC (on_tempsc_value_changed), temper);
>
> It works but while in function on_tempsc_value_changed, I cannot get the
> current value. While compiling, i have "incompatible types in
> assignment"... What does taht mean and how to correct it ??
> Here is the function I used:
>
> void
> on_tempsc_value_changed (GtkAdjustment *adj,
> GtkRange *scrollbar)
> {
> temp = gtk_range_get_adjustment (scrollbar);
> printf("temp changed %f\n", temp);
> }
>
> Thanks for you help
>
The correct way is to use int temp = adj->value; or int temp =
gtk_range_get_adjustment (scrollbar)->value
Ronald
--
---------------------------------------------------.
-- .-. | Ronald Bultje |
-- /V\ | Running: Linux 2.4.2 and OpenBSD 2.8 |
-- // \\ | E-mail : rbultje ronald bitfreak net |
-- /( )\ | WWW : http://ronald.bitfreak.net/ |
-- ^^-^^ | *** Warning: Unix Addicted *** |
---------------------------------------------------'
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]