[glade--]Re: newbie glade-- questions (kingsley)
- From: Thomas Adams <thomas adams onlinehome de>
- To: glademm-list gnome org
- Subject: [glade--]Re: newbie glade-- questions (kingsley)
- Date: Mon, 2 Sep 2002 10:11:16 +0200
>Subject: [glade--]newbie glade-- questions
>
>
>I've pawed through just about every piece of doco I can find,
>and have not found the answer to this, so here goes:
>
>I have built a glade (in C++ mode) app, after much
>fiddling it's compiling ok (with some changes to src/makefile
>after the autogen.sh).
>
>I have a Dialog window with a spin-control in it.
>(and an [Ok] [Cancel] button).
>
>I have the 'changed' signal set up, and can catch that
>signal, so my program 'knows' the spinner has changed,
>but how do I get a pointer to the spinner control so
>I can read the value? Well I guess the real question is
>How do I talk to a control in a dilaog window ?
>
>I notice that in the *_glade.cc that the control is created
>and the pointer (returned from the new) is not saved.
>Can someone please explain how to do this, I've been fighting
>with it for 2 days and am just abou tto give up.
>
>thanks,
>-kt
>
>PS> While we're here, how do I make the [Ok] button on the dialog
>be the default? Fiddling with "Can Default" & "Has Default" doesn't
>seem to do anything.
Dear Kingsley,
I had encountered the same problem. First you have to determine the
class visibility for the control in glade (in most cases protected
is sufficient). This will give you access to your cotrol from the
class derived from glade. As a further possibility you could
use the function glademm_get_widget( widget_name) to retrieve
your controls by name. But be careful, the names must be unique
all over your project.
For the other problem, try setting the focus on it.
Regards
Thomas Adams
Schwanthalerstr. 184
80339 München
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]