Skip to content
This repository has been archived by the owner on Jul 22, 2024. It is now read-only.

showall overrides controls marked with visible == false #609

Closed
BioTurboNick opened this issue Jan 14, 2022 · 6 comments
Closed

showall overrides controls marked with visible == false #609

BioTurboNick opened this issue Jan 14, 2022 · 6 comments

Comments

@BioTurboNick
Copy link
Contributor

showall is the method used to render the controls added to a Gtk window.

However, it also overrides any controls that had been set to visible == false. This is an issue when trying to design a GUI with some default-invisible controls in Glade, as they have to be turned off again after showall.

Now, this behavior is possibly obvious from the name showall, but perhaps a different method is needed for the initial display call that doesn't have that behavior?

@tknopp
Copy link
Collaborator

tknopp commented Jan 15, 2022

  • is this used in Gtk.jl itself or just in the tests?
  • could you try just calling show on a window and look what happens?
  • look what typical Gtk examples do?

@BioTurboNick
Copy link
Contributor Author

It's used all over the documentation. E.g. https://juliagraphics.github.io/Gtk.jl/latest/manual/gettingStarted/

When I just call show on the window, some elements aren't rendered.

@jwahlstrand
Copy link
Contributor

There is a "no_show_all" property that lets a widget ignore "showall" calls to its parents. It also can be set within Glade.

@tknopp
Copy link
Collaborator

tknopp commented Jan 15, 2022

That it is used in the documentation does not mean a lot because showall is a valid Gtk function. My question was rather, if we abuse it somewhere in Gtk.jl internally where it should not be used and surprisingly makes widgets visible.

@BioTurboNick
Copy link
Contributor Author

Yeah, I guess it's just a part of Gtk's design I didn't appreciate. I'll find a spot in the documentation to mention this.

@BioTurboNick
Copy link
Contributor Author

But to answer your question, no it's not an issue inside Gtk.jl. It's only used once and in that location it's appropriate.

@tknopp tknopp closed this as completed Jan 17, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants