Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Nebula » [grid] column width font size
[grid] column width font size [message #48255] Wed, 30 January 2008 12:12 Go to next message
Grant Slender is currently offline Grant SlenderFriend
Messages: 36
Registered: July 2009
Member
Hi,

When I work out the exact width of a font string "test" this size is not
enough when setting the column width to display "test".

Clearly there is some margin being used - how can I programmatically
determine what that margin is (that if the text is bigger it shows a ...
instead)

Cheers,
Grant
Re: [grid] column width font size [message #48284 is a reply to message #48255] Wed, 30 January 2008 12:29 Go to previous message
Grant Slender is currently offline Grant SlenderFriend
Messages: 36
Registered: July 2009
Member
I found my answer - DefaultCellRenderer has a left and right margin of 4
pixels... would be nice if we could provide a getMargin so that we can
assign widths based on text font size without having to check for
changes in the source.

Grant Slender wrote:
> Hi,
>
> When I work out the exact width of a font string "test" this size is not
> enough when setting the column width to display "test".
>
> Clearly there is some margin being used - how can I programmatically
> determine what that margin is (that if the text is bigger it shows a ...
> instead)
>
> Cheers,
> Grant
Re: [grid] column width font size [message #588225 is a reply to message #48255] Wed, 30 January 2008 12:29 Go to previous message
Grant Slender is currently offline Grant SlenderFriend
Messages: 36
Registered: July 2009
Member
I found my answer - DefaultCellRenderer has a left and right margin of 4
pixels... would be nice if we could provide a getMargin so that we can
assign widths based on text font size without having to check for
changes in the source.

Grant Slender wrote:
> Hi,
>
> When I work out the exact width of a font string "test" this size is not
> enough when setting the column width to display "test".
>
> Clearly there is some margin being used - how can I programmatically
> determine what that margin is (that if the text is bigger it shows a ...
> instead)
>
> Cheers,
> Grant
Previous Topic:[grid] column width font size
Next Topic:Some Grid-questions
Goto Forum:
  


Current Time: Mon Sep 23 17:22:40 GMT 2024

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

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

Back to the top