[Gambas-user] TableView Lacking Alignment Function
Randy Millner
randlemillner at ...626...
Wed Nov 16 16:23:32 CET 2011
Hello Rolf, thanks for the reply,
I tried manually declaring padded whitespace. Example:
TableView1.Columns[7].Title = " Amount"
And the result was only one space being delivered to the final output:
" Amount"
What would be different if I wrote a function?
On Tue, Nov 15, 2011 at 1:22 PM,
<gambas-user-request at lists.sourceforge.net> wrote:
> Am 13.11.2011 13:50, schrieb Randy Millner:
>> gambas2.23
>>
>> I can right align the column data in the tableview with :
>> TableView1[rowctr, 7].Alignment = align.Right
>>
>>
>>
>> I cannot seem to align.right the corresponding title :
>> TableView1.Columns[7].Title = "Amount"
>> I am at wits end, I have tried all the ways that don't work
>>
>> Thank you
>>
>
> Interesting, Randy,
>
> never had this problem, so I didn't realize there is no Alignment
> property for the Column headers. As there is nothing in the help, I
> think it is simply not there.
>
> Could you try to do it yourself? Write a little function that delivers a
> string filled with white spaces just enough to push the text to the
> right edge. It would have to measure the Width of the column, deduct the
> length of the header string (something with Fontwidth) and IF it's
> shorter than the column's width, add (maybe a loop necessary?) white
> spaces accordingly.
>
> Regards
>
> Rolf
>
More information about the User
mailing list