Tree H_SCROLL and Images [message #645054] |
Wed, 15 December 2010 12:04 |
Tiber Sept Messages: 32 Registered: February 2010 |
Member |
|
|
Hello RAP community,
we moved a project from RAP 1.3.0 (2010-06-15) to RAP 1.4 M3 yesterday and we have two issues with the new Tree widget.
- Issue 1 (H_SCROLL): The width of the item text generally exceeds the width of the tree client area. The horizontal scroll bar
is displayed but it never becomes active. The SWT Tree is created with the SWT.H_SCROLL style. V_SCROLL seems to work fine.
- Issue 2 (Images): The tree items in the project are generally rendered with images, but some do not have such. In these cases
the space for the image is left blank and the text is left aligned with the text of items that have images. So there is a gaping hole
between expand symbol and text. The desired behavior would be to not leave space between the expand symbol and the text.
Has anyone encountered these issues ? And if yes, are there easy solutions ?
Regards,
tibersept
[Updated on: Thu, 16 December 2010 10:32] Report message to a moderator
|
|
|
Re: Tree H_SCROLL and Images [message #645092 is a reply to message #645054] |
Wed, 15 December 2010 14:59 |
|
Hi tibersept,
tibersept wrote on Wed, 15 December 2010 07:04 |
Issue 2 (Images): The tree items in the project are generally rendered with images, but some do not have such. In these cases
the space for the image is left blank and the text is left aligned with the text of items that have images. So there is a gaping hole
between expand symbol and text. The desired behavior would be to not leave space between the expand symbol and the text.
|
This is the standard SWT behavior. Since RAP tries to be 100% compatible with SWT (including quirks like this), this won't be changed in RAP unless it is also changed in SWT. You could ask on the SWT newsgroups and/or post a bug over there to see if they have a work around or a forthcoming bugfix.
That said, if you don't mind building RAP from source, you could probably patch it for your purposes without too much trouble.
Cole
|
|
|
Re: Tree H_SCROLL and Images [message #645166 is a reply to message #645054] |
Wed, 15 December 2010 18:33 |
Ivan Furnadjiev Messages: 2426 Registered: July 2009 Location: Sofia, Bulgaria |
Senior Member |
|
|
Hi tibersept,
could you try it against CVS HEAD (upcoming M4)? We replaced the native
browser scrollbars in all widgets with a new theme-able one. If the
problem persists, please open a bugzilla with a snippet to reproduce it.
Thanks,
Ivan
On 15.12.2010 2:04 PM, tibersept wrote:
> Hello RAP community,
>
> I moved a project from RAP 1.3.0 (2010-06-15) to RAP 1.4 M3 yesterday
> and I have two issues with the new Tree widget.
>
>
> Issue 1 (V_SCROLL): The width of the item text generally exceeds the
> width of the tree client area. The horizontal scroll bar
> is displayed but it never becomes active. The SWT Tree is created with
> the SWT.H_SCROLL style. V_SCROLL seems to work fine.
> Issue 2 (Images): The tree items in the project are generally rendered
> with images, but some do not have such. In these cases the space for
> the image is left blank and the text is left aligned with the text of
> items that have images. So there is a gaping hole
> between expand symbol and text. The desired behavior would be to not
> leave space between the expand symbol and the text.
>
>
> Has anyone encountered these issues ? And if yes, are there easy
> solutions ?
>
> Regards,
> tibersept
|
|
|
Re: Tree H_SCROLL and Images [message #645267 is a reply to message #645166] |
Thu, 16 December 2010 10:32 |
Tiber Sept Messages: 32 Registered: February 2010 |
Member |
|
|
Hello,
thanks for the replies.
Concerning H_SCROLL, i did some tests against CVS HEAD and got the same results. The specific behavior can be observed
directly in the Workbench Demo, just reduce the width of views containing trees. I filed a bug here but did not look further
at why it isn't working. Tested with FF 3.6.13, IE8, Chrome 8, Opera 10.
Concerning the second issue, SWT provides events like SWT.MeasureItem and SWT.PaintItem, which are not supported in RAP
but would help to set the TreeItem content as desired in a desktop app. So this does not seem to be really a bug or an issue in SWT.
Any tips on how I can achieve something similar in RAP ( force computation of TreeItem image size for each tree item ) ?
We would like to avoid modifying the RAP sources or creating a general custom widget for trees.
Regards,
tibersept
|
|
|
Powered by
FUDForum. Page generated in 0.03443 seconds