Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Standard Widget Toolkit (SWT) » jumping text in tree editor
jumping text in tree editor [message #451388] Mon, 28 February 2005 22:50 Go to next message
Eclipse UserFriend
Originally posted by: kent.generatescape.com

Hi-ya

I've got a tree in a treeviewer with icons and text defined as below:


layoutData = new GridData();
layoutData.grabExcessHorizontalSpace = true;
layoutData.grabExcessVerticalSpace = true;
layoutData.horizontalAlignment = GridData.FILL;
layoutData.verticalAlignment = GridData.FILL;
treeViewer.getControl().setLayoutData(layoutData);

Then later I catch a double click and set the text as follows:
editor.setEditor(text, item);

The problem is when I click on to the text, the text jumps up until I press
return, and then it goes back into its vertical alignment. The icons seemed
to have a good deal of white space around them so some sort of padding might
be in effect.

I have played with the grabExcessVerticalSpace in the layout and with
grabVertical in the editor with no success.

Does anyone have any ideas?

thanks

kent
Re: jumping text in tree editor [message #451413 is a reply to message #451388] Tue, 01 March 2005 12:58 Go to previous message
Eclipse UserFriend
Originally posted by: kent.generatescape.com

I also unsuccessfully tried to adjust the bounds of the Text object I create
to do the editing, matching them to the size of the images in the tree.

I am still clueless.

"kent" <kent@generatescape.com> wrote in message
news:d0072h$7lm$1@www.eclipse.org...
> Hi-ya
>
> I've got a tree in a treeviewer with icons and text defined as below:
>
>
> layoutData = new GridData();
> layoutData.grabExcessHorizontalSpace = true;
> layoutData.grabExcessVerticalSpace = true;
> layoutData.horizontalAlignment = GridData.FILL;
> layoutData.verticalAlignment = GridData.FILL;
> treeViewer.getControl().setLayoutData(layoutData);
>
> Then later I catch a double click and set the text as follows:
> editor.setEditor(text, item);
>
> The problem is when I click on to the text, the text jumps up until I
> press return, and then it goes back into its vertical alignment. The icons
> seemed to have a good deal of white space around them so some sort of
> padding might be in effect.
>
> I have played with the grabExcessVerticalSpace in the layout and with
> grabVertical in the editor with no success.
>
> Does anyone have any ideas?
>
> thanks
>
> kent
>
>
>
>
>
Previous Topic:How do I get Checkboxes in a Table?
Next Topic:TreeViewer refresh
Goto Forum:
  


Current Time: Thu Apr 25 09:07:27 GMT 2024

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

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

Back to the top