comp.lang.ada
 help / color / mirror / Atom feed
* Gtk3 Checkbutton Question
@ 2016-07-31 14:19 ldries46
  2016-07-31 14:26 ` Dmitry A. Kazakov
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: ldries46 @ 2016-07-31 14:19 UTC (permalink / raw)


I have a Checkbutton in a dialog.
In some cases I don't want to see that Checkbutton, because the program will 
prohibit the calulation that Checkbutton is needed for.

I found the method Set_Visible for the Checkbutton and applied it I was 
under the inpression that when I used Show_all for that dialog I would not 
see the Checkbutton (with false as parameter).
But the Checkbutton could be used and it even could be check with some Error 
as result.

What do I have to do to just hide only the Checkbutton in the Dialog

L. Dries

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Gtk3 Checkbutton Question
  2016-07-31 14:19 Gtk3 Checkbutton Question ldries46
@ 2016-07-31 14:26 ` Dmitry A. Kazakov
  2016-07-31 14:57 ` ldries46
  2016-07-31 15:02 ` ldries46
  2 siblings, 0 replies; 6+ messages in thread
From: Dmitry A. Kazakov @ 2016-07-31 14:26 UTC (permalink / raw)


On 2016-07-31 16:19, ldries46 wrote:
> I have a Checkbutton in a dialog.
> In some cases I don't want to see that Checkbutton, because the program
> will prohibit the calulation that Checkbutton is needed for.
>
> I found the method Set_Visible for the Checkbutton and applied it I was
> under the inpression that when I used Show_all for that dialog I would
> not see the Checkbutton (with false as parameter).
> But the Checkbutton could be used and it even could be check with some
> Error as result.
>
> What do I have to do to just hide only the Checkbutton in the Dialog

Gtk.Widget:

    procedure Hide (Widget : not null access Gtk_Widget_Record);

-- 
Regards,
Dmitry A. Kazakov
http://www.dmitry-kazakov.de


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Gtk3 Checkbutton Question
  2016-07-31 14:19 Gtk3 Checkbutton Question ldries46
  2016-07-31 14:26 ` Dmitry A. Kazakov
@ 2016-07-31 14:57 ` ldries46
  2016-07-31 15:02 ` ldries46
  2 siblings, 0 replies; 6+ messages in thread
From: ldries46 @ 2016-07-31 14:57 UTC (permalink / raw)


Pitty I just replaced Set_Visible(false) by Hide  and nothing happened
The problem stays the same

"ldries46"  schreef in bericht news:579e08ef$0$19551$e4fe514c@news.kpn.nl...

I have a Checkbutton in a dialog.
In some cases I don't want to see that Checkbutton, because the program will
prohibit the calulation that Checkbutton is needed for.

I found the method Set_Visible for the Checkbutton and applied it I was
under the inpression that when I used Show_all for that dialog I would not
see the Checkbutton (with false as parameter).
But the Checkbutton could be used and it even could be check with some Error
as result.

What do I have to do to just hide only the Checkbutton in the Dialog

L. Dries 

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Gtk3 Checkbutton Question
  2016-07-31 14:19 Gtk3 Checkbutton Question ldries46
  2016-07-31 14:26 ` Dmitry A. Kazakov
  2016-07-31 14:57 ` ldries46
@ 2016-07-31 15:02 ` ldries46
  2016-07-31 15:26   ` Dmitry A. Kazakov
  2 siblings, 1 reply; 6+ messages in thread
From: ldries46 @ 2016-07-31 15:02 UTC (permalink / raw)


Just for information.
I Use Show_All for showing the dialog. When I use Show for the Dialog this 
means that other parts of the dialog also disappear.
Does that mean that I have to show all elements within the dialog apart

L. Dries

"ldries46"  schreef in bericht news:579e08ef$0$19551$e4fe514c@news.kpn.nl...

I have a Checkbutton in a dialog.
In some cases I don't want to see that Checkbutton, because the program will
prohibit the calulation that Checkbutton is needed for.

I found the method Set_Visible for the Checkbutton and applied it I was
under the inpression that when I used Show_all for that dialog I would not
see the Checkbutton (with false as parameter).
But the Checkbutton could be used and it even could be check with some Error
as result.

What do I have to do to just hide only the Checkbutton in the Dialog

L. Dries 


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Gtk3 Checkbutton Question
  2016-07-31 15:02 ` ldries46
@ 2016-07-31 15:26   ` Dmitry A. Kazakov
  2016-08-16  9:44     ` briot.emmanuel
  0 siblings, 1 reply; 6+ messages in thread
From: Dmitry A. Kazakov @ 2016-07-31 15:26 UTC (permalink / raw)


On 2016-07-31 17:02, ldries46 wrote:
> Just for information.
> I Use Show_All for showing the dialog.

Show_All recursively calls Show for the widget and all its children.

> When I use Show for the Dialog
> this means that other parts of the dialog also disappear.

No, it means that only the given widget is shown, the dialog itself is 
in this case.

> Does that mean that I have to show all elements within the dialog apart

This is what Show_All does. Hide is to reverse Show. If that does not 
work, it means you called it too early or on a wrong widget.

BTW, another techniques are:

1. Remove/add children to the container as they needed, dynamically.

2. Use Set_Sensitive to gray the widget out, leaving it visible.

The second method is preferable when the user must see all possibilities 
or when the widget layout must be preserved.

-- 
Regards,
Dmitry A. Kazakov
http://www.dmitry-kazakov.de


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Gtk3 Checkbutton Question
  2016-07-31 15:26   ` Dmitry A. Kazakov
@ 2016-08-16  9:44     ` briot.emmanuel
  0 siblings, 0 replies; 6+ messages in thread
From: briot.emmanuel @ 2016-08-16  9:44 UTC (permalink / raw)


gtk+ now provides a procedure Gtk.Widget.Set_No_Show_All so that Show_All does not impact a specific widget. I believe it might be exactly what the original poster was looking for


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2016-08-16  9:44 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-07-31 14:19 Gtk3 Checkbutton Question ldries46
2016-07-31 14:26 ` Dmitry A. Kazakov
2016-07-31 14:57 ` ldries46
2016-07-31 15:02 ` ldries46
2016-07-31 15:26   ` Dmitry A. Kazakov
2016-08-16  9:44     ` briot.emmanuel

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox