I'm creating an application using eclipse RCP, I have many Part and I want to resize them. Some of these parts don't need many space.
I've checked in Application.4xmi but I didn't found anything helpful.
Any ideas?
You can set the size of a Trimmed Window in the Application.e4xmi by setting the Bounds width and height values.
Usually you then use PartSashContainer to divide up the window. You specify a percentage used for each child in the Container Data for the child.
Related
Background: we have TinyMCE React inside a few contexts where the parent element is manually resized by the user (resizable modal dialog, etc.) and we want the TinyMCE component to resize appropriately. In older versions, we did this using the resizeTo functionality documented here. However, that no longer seems to be available after the upgrade.
My previous attempt to resolve this involved using a key based on concatenating the width and height of the editor with a debounce while it was resizing. Basically, whenever the size changed by enough, I tore down the old component and rendered a new one whose config options included the new size. While this is largely effective, it causes an issue where, when you attempt to edit the field after resizing, it flickers and loses focus initially.
Unfortunately, we are using pixel-based size calculations, so specifying the height in percentages instead of pixels won't work.
What is the new official way to do this? Ideally, there would be some new version of editor.theme.resizeTo that we could use instead and dispatch with the key-based solution entirely, but I was unable to find it in any of the documentation.
Just wrap the editor in a div which has the calculated height and width, and then set the editor to height and width of 100%.
I am trying to make different UI layouts for my e4 RCP application depending on the resolution. I am trying to set a fixed container data value for my parts but have no idea how to do this. Basically in the layout below I have a partstash container with a part and another partstash with two parts. I want the partstashes to be a fixed size and not resizeable. How do i achieve this? Alternatively is there a way to ensure that the content within a stash container will auto resize and always fit?
Add the tag NoMove to the 'Part Sash Container' containing the parts that should not be resizable.
So here:
Setting the NoMove tag prevents the child part stacks and sash container from being resized
I prgram an application with Java and use RCP4.
Now I´d like to program an navigation Bar in my application.
The navigation Bar shoud have a fix width which shoud not be modifiable.
Can I do thas with a Part in the RCP4 application model?
I found no way to fix the size of a Part.
If your part belongs to Part Sash Container, you should create your own renderer (Something similar to org.eclipse.swt.custom.SashForm)
http://www.eclipse.org/forums/index.php/t/173646/ may be useful.
What about using a TrimBar? We embedded a navigation tree into the left-side Window Trim. TrimBar's can't be resized but will change size to accommodate what they contain (i.e. the left side trim bar's width will grow so that the tree will fit), but cannot be resized by the user.
If, however, you would like to use a Part, create a Part Sash Container to separate this Part from the rest of the items in your perspective and then add "NoMove" as a Tag to the Part Sash Container. This prevents the sash from being resized.
I have a Gtk.TextView inside a Gtk.Fixed and I set it its width and height and wrap mode.
My problem is that I need to avoid the TextView expanding when the user inserts more text than what fits in the set size. In that case I just need to prevent the user from keeping writing.
Any help?
If you have a single line entry as input better use textentry instead of textview.
For text entry your can set the maximum length of textentry.
For development of UI using glade.
Moreover if your UI changes depending on configuration file from server,
there is a solution for this also, have all the widgets in the window, show/hide the widgets depending on the config file from server.
why dont you use GLADE for UI development ?.
It provides more handy ways to achieve your task.
In glade you have all the options to set, you can cross verify and check in real time.
I'm using a TreeViewer within a jface WizardPage and the initial input into the tree causes the WizardPage to grow vertically so that it can show all of the tree's values. When expanding one of the tree's values, then the vertical scrollbar works as expected. I'd like to be able to set the tree's size initially so that it is fixed and the scrollbar is already shown when the WizardPage is first drawn, but doing this isn't particularly obvious to me - the setSize method on the TreeViewer's Tree doesn't seem to do anything.
Any help would be appreciated!
Just for the records for this old question:
We solve this problem in our applications by using an own layout manager which we can set fixed sizes for certain controls (with Swing we had done that by using component.setPreferredSize(size)). If no such fixed size is used, we calculate the preferred size of the control while performing the layout. This prevents making controls getting more and more space depending on the control's content when the user resizes the application window or dialog.