Table view column labels do not line up

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Table view column labels do not line up

Carl Gundel-2
In the following example, why don't the column labels line up correctly?

| builder windowSpec gridModel gridSpec tableInterface |
        builder := UIBuilder new.
builder window: ApplicationWindow new.
windowSpec := WindowSpec label: 'my window'.
builder add: windowSpec.
gridModel := TwoDList on: #(
'c1 r1' 'c2 r1' 'c3 r1' 'c4 r1' 'c5 r1'
'c1 r2' 'c2 r2' 'c3 r2' 'c4 r2' 'c5 r2'
'c1 r3' 'c2 r3' 'c3 r3' 'c4 r3' 'c5 r3'
'c1 r4' 'c2 r4' 'c3 r4' 'c4 r4' 'c5 r4'
) columns: 5 rows: 4.
tableInterface := TableInterface new selectionInTable:
(SelectionInTable with: gridModel).
tableInterface columnLabelsArray: #('Column 1' 'Column 2' 'Column 3'
'Column 4' 'Column 5').
gridSpec := (TableViewSpec new)
                layout:  (10@45 extent: 280@150);
                name: #graphPane;
                model: tableInterface;
                yourself.
builder add: gridSpec.
builder openWithExtent: 300@240 andType: #normal

Thanks,

-Carl Gundel
http://www.libertybasic.com
http://www.runbasic.com
_______________________________________________
vwnc mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc
Reply | Threaded
Open this post in threaded view
|

Re: Table view column labels do not line up

Travis Griggs-4

On May 12, 2012, at 12:35 PM, Carl Gundel wrote:

> In the following example, why don't the column labels line up correctly?
>
> | builder windowSpec gridModel gridSpec tableInterface |
> builder := UIBuilder new.
> builder window: ApplicationWindow new.
> windowSpec := WindowSpec label: 'my window'.
> builder add: windowSpec.
> gridModel := TwoDList on: #(
> 'c1 r1' 'c2 r1' 'c3 r1' 'c4 r1' 'c5 r1'
> 'c1 r2' 'c2 r2' 'c3 r2' 'c4 r2' 'c5 r2'
> 'c1 r3' 'c2 r3' 'c3 r3' 'c4 r3' 'c5 r3'
> 'c1 r4' 'c2 r4' 'c3 r4' 'c4 r4' 'c5 r4'
> ) columns: 5 rows: 4.
> tableInterface := TableInterface new selectionInTable:
> (SelectionInTable with: gridModel).
> tableInterface columnLabelsArray: #('Column 1' 'Column 2' 'Column 3'
> 'Column 4' 'Column 5').
> gridSpec := (TableViewSpec new)
> layout:  (10@45 extent: 280@150);
> name: #graphPane;
> model: tableInterface;
> yourself.
> builder add: gridSpec.
> builder openWithExtent: 300@240 andType: #normal

What do you mean by "not line up correctly" ? Do you mean that the column headers appear to be centered over the columns, but the column entries are left aligned?

--
Travis Griggs
Objologist
"An idea, like a ghost, must be spoken to a little before it will explain itself." - Charles Dickens


_______________________________________________
vwnc mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc
Reply | Threaded
Open this post in threaded view
|

Re: Table view column labels do not line up

Carl Gundel-2
The column labels don't line up.  They aren't the same width as the
cells below them.  It isn't related to justification.

-Carl

On Sat, May 12, 2012 at 4:20 PM, Travis Griggs <[hidden email]> wrote:

>
> On May 12, 2012, at 12:35 PM, Carl Gundel wrote:
>
>> In the following example, why don't the column labels line up correctly?
>>
>> | builder windowSpec gridModel gridSpec tableInterface |
>>       builder := UIBuilder new.
>> builder window: ApplicationWindow new.
>> windowSpec := WindowSpec label: 'my window'.
>> builder add: windowSpec.
>> gridModel := TwoDList on: #(
>> 'c1 r1' 'c2 r1' 'c3 r1' 'c4 r1' 'c5 r1'
>> 'c1 r2' 'c2 r2' 'c3 r2' 'c4 r2' 'c5 r2'
>> 'c1 r3' 'c2 r3' 'c3 r3' 'c4 r3' 'c5 r3'
>> 'c1 r4' 'c2 r4' 'c3 r4' 'c4 r4' 'c5 r4'
>> ) columns: 5 rows: 4.
>> tableInterface := TableInterface new selectionInTable:
>> (SelectionInTable with: gridModel).
>> tableInterface columnLabelsArray: #('Column 1' 'Column 2' 'Column 3'
>> 'Column 4' 'Column 5').
>> gridSpec := (TableViewSpec new)
>>               layout:  (10@45 extent: 280@150);
>>               name: #graphPane;
>>               model: tableInterface;
>>               yourself.
>> builder add: gridSpec.
>> builder openWithExtent: 300@240 andType: #normal
>
> What do you mean by "not line up correctly" ? Do you mean that the column headers appear to be centered over the columns, but the column entries are left aligned?
>
> --
> Travis Griggs
> Objologist
> "An idea, like a ghost, must be spoken to a little before it will explain itself." - Charles Dickens
>
>
> _______________________________________________
> vwnc mailing list
> [hidden email]
> http://lists.cs.uiuc.edu/mailman/listinfo/vwnc

_______________________________________________
vwnc mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc
Reply | Threaded
Open this post in threaded view
|

Re: Table view column labels do not line up

Boris Popov, DeepCove Labs (SNN)

A picture is worth a thousand words, I guess.

 

 

-Boris

 

-----Original Message-----
From: [hidden email] [mailto:[hidden email]] On Behalf Of Carl Gundel
Sent: Saturday, May 12, 2012 5:11 PM
To: VWNC
Subject: Re: [vwnc] Table view column labels do not line up

 

The column labels don't line up.  They aren't the same width as the cells below them.  It isn't related to justification.

 

-Carl

 

On Sat, May 12, 2012 at 4:20 PM, Travis Griggs <[hidden email]> wrote:

> 

> On May 12, 2012, at 12:35 PM, Carl Gundel wrote:

> 

>> In the following example, why don't the column labels line up correctly?

>> 

>> | builder windowSpec gridModel gridSpec tableInterface |

>>       builder := UIBuilder new.

>> builder window: ApplicationWindow new.

>> windowSpec := WindowSpec label: 'my window'.

>> builder add: windowSpec.

>> gridModel := TwoDList on: #(

>> 'c1 r1' 'c2 r1' 'c3 r1' 'c4 r1' 'c5 r1'

>> 'c1 r2' 'c2 r2' 'c3 r2' 'c4 r2' 'c5 r2'

>> 'c1 r3' 'c2 r3' 'c3 r3' 'c4 r3' 'c5 r3'

>> 'c1 r4' 'c2 r4' 'c3 r4' 'c4 r4' 'c5 r4'

>> ) columns: 5 rows: 4.

>> tableInterface := TableInterface new selectionInTable:

>> (SelectionInTable with: gridModel).

>> tableInterface columnLabelsArray: #('Column 1' 'Column 2' 'Column 3'

>> 'Column 4' 'Column 5').

>> gridSpec := (TableViewSpec new)

>>               layout:  (10@45 extent: 280@150);

>>               name: #graphPane;

>>               model: tableInterface;

>>               yourself.

>> builder add: gridSpec.

>> builder openWithExtent: 300@240 andType: #normal

> 

> What do you mean by "not line up correctly" ? Do you mean that the column headers appear to be centered over the columns, but the column entries are left aligned?

> 

> --

> Travis Griggs

> Objologist

> "An idea, like a ghost, must be spoken to a little before it will

> explain itself." - Charles Dickens

> 

> 

> _______________________________________________

> vwnc mailing list

> [hidden email]

> http://lists.cs.uiuc.edu/mailman/listinfo/vwnc

 

_______________________________________________

vwnc mailing list

[hidden email]

http://lists.cs.uiuc.edu/mailman/listinfo/vwnc


_______________________________________________
vwnc mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc
Reply | Threaded
Open this post in threaded view
|

Re: Table view column labels do not line up

Travis Griggs-4

On May 12, 2012, at 4:03 PM, Boris Popov, DeepCove Labs wrote:

A picture is worth a thousand words, I guess.
 
<image001.png>
 


Like this one?



:D

Mine doesn't show the problem. Which is a great demonstration of just why a picture is SOOO worth a 1000 words. On Windows, the code is stretching the 5 labels evenly over the entire list, scrollbar width included. And down in the list zone, it's doing them uniformly across the width minus the scrollbar. If you use a layout: argument of (0 @ 0 corner: 1@1) asLayout, you get a resizable layout bound to the window size, so you can change the size and watch the effect. On OSX, it will clip the labels to rightmost point to the left side of the right scrollbar. Whereas your screenshot shows that in its case, the rightmost clip of the labels is the *right* side of the right scrollbar.

I don't see at first glance of the code why this is happening. Someone (possibly even me) will have to glare a little harder at it.

--
Travis Griggs
Objologist
"Every institution finally perishes by an excess of its own first principle." - Lord Acton




_______________________________________________
vwnc mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc