Hiding GeDialog elements
-
Hello,
I am trying to hide a group of elements from a GeDialog.
In
MyDialog::InitValues()
I am usingHideElement()
to hide the group (in case the user is already logged in).This is how it looks before:
And this is how it looks after the HideElement() call:
So yeah, the group is kinda gone, but I would prefer it not to leave a big hole in the dialog. How can I achieve that?
Thanks & greetings,
Frank -
I have done something similar using
HideElement
to show/hide a group of elements in aGeDialog
, but in my case there is no gap left.
However, the group I am hiding is the first in a list of groups, as such there are other elements after that can fill up the gap.
Have you tried having additional elements after? Maybe a simple emptyAddStaticText
, just to try out? -
Hi @fwilleke80, I'm not able to reproduce your issue so could you send us a quick code, or at least describe how you setup your dialog?
But few things, while in my test I have been able to hide element in the InitValues without issue.
You could try to call a LayoutChanged with the parent group after the HideElement.Cheers,
Maxime. -
Hi Maxime,
thanks for your message! Weird, I cannot reproduce it anymore, either. Strange. Sorry.
Cheers,
Frank -
Hi,
although the question is somehow solved I would like to point out that I have encountered a similar behaviour for
GeDialog.HideElement
when invoking it on elements of a resource that contains a multi-column container: The area of the hidden element went black. I do have not a solution, since I did not bother investigating the problem any further and went for disabling elements instead, but I thought it might be helpful for someone anyways.Cheers
zipit -
Thanks a lot, @zipit I was able to reproduce the issue.
But I can confirm calling LayoutChanged on the master group of the group that is hidden, fix the issue.
So if you if have
Group 1000
|----- Group 1001And Group 1001 should be hidden you should call LayoutChanged(1000).
So from our point of view, it's not a bug, since either you have to hide the layout in the CreateLayout or call LayoutChanged to invalidate an area. Why it was working previously? I would say by luck because previously our redraw was not at all optimized and the whole dialog was redrawn every time, while now only the needed stuff is invalidated and redraw.Cheers,
Maxime. -
Thanks, Maxime!
That answers all my questionsI'll mark this solved now.