Non-Closeable Views are closeable via Menu [message #1711463] |
Fri, 16 October 2015 10:14 |
Ludwig Moser Messages: 476 Registered: July 2009 |
Senior Member |
|
|
This is kind of tricky to find (but hey, some users did!)
First a summary of what i try to do.
I created several Views in my Application which shall NOT be closeable.
therefore i add them to a IViewLayout and disable closeable:
public void preventClose(IPageLayout layout, String... viewIds) {
if (debug)
System.out.println("disable close for " + viewIds.length + " views");
for (int i = 0; i < viewIds.length; i++) {
if (debug)
System.out.println("\tdisable close for: " + viewIds[i]);
try {
IViewLayout vLayout = layout.getViewLayout(viewIds[i]);
vLayout.setCloseable(false);
} catch (Exception e) {
System.err.println("the id you passed for preventClose is not a View (Folder?): " + viewIds[i]);
}
}
}
this is nice and works!
i noticed that you can still close the Views if you drag em outside of the Application, as they gain normal Shell-Controls then (already discussed this with Tom Schindl, and we noticed this to be a non trivial case)
but now i noticed a trivial case where an Menu-Point keeps visible which should not show up with closeable=false
you can 'Minimize' a view in a folderLayout, then you get a quick-toolbar, with an restore button/Icon, and an icon/button for each View.
rightclick on an icon/button. a context menue pops up giving you the following options:
Orientation > (with submenu)
Restore
Close <- this is just wrong, if closeable is false!
is there a way i can influence this menu?
[Updated on: Fri, 16 October 2015 10:19] Report message to a moderator
|
|
|
Re: Non-Closeable Views are closeable via Menu [message #1711465 is a reply to message #1711463] |
Fri, 16 October 2015 10:19 |
Thomas Schindl Messages: 6651 Registered: July 2009 |
Senior Member |
|
|
No you need to file a bug report so that it can be fixed - to only other
chance I see is to roll your own renderer.
Tom
On 16.10.15 12:14, Ludwig Moser wrote:
> This is kind of tricky to find (but hey, some users did!)
>
> First a summary of what i try to do.
> I created several Views in my Application which shall NOT be closeable.
> therefore i add them to a IViewLayout and disable closeable:
>
>
> public void preventClose(IPageLayout layout, String... viewIds) {
> if (debug)
> System.out.println("disable close for " + viewIds.length + " views");
> for (int i = 0; i < viewIds.length; i++) {
> if (debug)
> System.out.println("\tdisable close for: " + viewIds[i]);
> try {
> IViewLayout vLayout = layout.getViewLayout(viewIds[i]);
> vLayout.setCloseable(false);
> } catch (Exception e) {
> System.err
> .println("the id you passed for preventClose is not a View (Folder?): "
> + viewIds[i]);
> }
> }
> }
>
>
> this is nice and works!
> i noticed that you can still close the Views if you drag em outside of the Application, as they gain normal Shell-Controls then (already discussed this with Tom Schindl, and we noticed this to be a non trivial case)
>
> but now i noticed a trivial case where an Menu-Point keeps visible which should not show up with closeable=false
>
> you can 'Minimize' a view in a folderLayout, then you get a quick-toolbar, with an restore button/Icon, and an icon/button for each view.
>
>
> rightclick on an icon/button. a context menue pops up giving you the following options:
>
>
> Orientation > (with submenu)
> Restore
> Close <- this is just wrong, if closeable is false!
>
>
>
>
> is there a way i can influence this menu?
>
|
|
|
|
Powered by
FUDForum. Page generated in 0.03131 seconds