Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Sirius » Invoking AutoSize programmatically
Invoking AutoSize programmatically [message #1791833] Thu, 05 July 2018 22:14 Go to next message
Parsa Pourali is currently offline Parsa PouraliFriend
Messages: 197
Registered: February 2014
Senior Member
Hello,

I have a container node which contains other nodes. When the contained nodes move, the parent container shows a scroll bar instead of resizing (expanding). I found that if the autosize has been already invoked by the user on the parent container, then it will expanded instead of showing the scrollbars (this is what I want). So, is there any way to programmatically invoke the autosize?

I tried the following on the parent container but didn't help. If this is the code, how/where/when should I use it ?
Request r = new Request(RequestConstants.REQ_autosize);
performRequest(r);

index.php/fa/33322/0/


Thanks,
Bests,
Parsa
  • Attachment: autosize.png
    (Size: 3.43KB, Downloaded 194 times)
Re: Invoking AutoSize programmatically [message #1791847 is a reply to message #1791833] Fri, 06 July 2018 08:19 Go to previous messageGo to next message
Steve Monnier is currently offline Steve MonnierFriend
Messages: 388
Registered: May 2011
Senior Member
Hello,

In the style of your container mapping, you need to set the "Height Computation Expression" and "Width Computation Expression" to -1 in order to be in autosize by default. You can check out the "Default size" part of the Container Style documentation [1].

Regards,
Steve

[1] https://www.eclipse.org/sirius/doc/specifier/diagrams/Diagrams.html#containers


Steve Monnier - Obeo
Need training or professional services for Sirius?
http://www.obeodesigner.com/sirius
Re: Invoking AutoSize programmatically [message #1791878 is a reply to message #1791847] Fri, 06 July 2018 12:33 Go to previous message
Parsa Pourali is currently offline Parsa PouraliFriend
Messages: 197
Registered: February 2014
Senior Member
Hi Steve,

What you said is generally correct. But assume that, the user resizes the created parent container which overwrites the size of -1. Therefore, the behaviour will change. In my case, I don't want the size of -1 be overwritten when users resize the container manually.

Thanks,
Parsa
Previous Topic:Rollback to a previous state of the model
Next Topic:Have a question about license of Sirius
Goto Forum:
  


Current Time: Sun Nov 18 01:16:18 GMT 2018

Powered by FUDForum. Page generated in 0.02221 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top