For Programmers: Free Programming Magazines  


Home > Archive > Tcl > March 2004 > Re: Tktable height and width dimensions









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Re: Tktable height and width dimensions
Jeff Hobbs

2004-03-29, 11:50 am

Ria wrote:

> how can i get the tktable height and width dimensions? i need this to
> display the scrollbars only if the table is larger then the screen.
>
> the "bbox" doesn't work, as it gives the width and height of the
> visible portion of the table( which is about the same as the frame
> dimensions i am compairing the table dimensions with).
>
> winfo width[/height] <tablepath> doesn't also return the right value.


You use the same command as you would with all other widgets
that scroll, the same command the scrollbars use - the xview
and yview commands. I would recommend using a prebuild
scrolledwindow widget like that in BWidgets if you want to
make life easier though.

--
Jeff Hobbs, The Tcl Guy
http://www.ActiveState.com/, a division of Sophos
Ria

2004-03-29, 5:39 pm

hi,

now when i am compairing the bottomright with the end, it gives me an
"autoscroll". BUT, as soon as even a small part of the "end" cell is
visible in the table, it deletes the scrollbar as it gets the end and
bottomright to be the same. I want the scrollbar to stay until the
full "end" cell is visible.

Any ideas?

tia

aric Bills" <aricb@u.wwashingtonn.edu> wrote in message news:<c42d7p$g36$1@nntp6.u.washington.edu>...
> Hi Ria,
>
> Try the index subcommand. Look at the "Indices" section of the man page for
> details on special named indices. Specifically, comparing origin vs.
> topleft and end vs. bottomright should give you all the info you need.
>
> Regards,
> Aric

Aric Bills

2004-03-29, 6:51 pm

Hi Ria,

Jeff's solution to use xview and yview is better than the one I suggested; I
would go with that. If [$table yview] doesn't return {0 1}, for example,
you know you need a vertical scrollbar. This should be true even in the
case where bottomright = end but the cell isn't fully visible.

Regards,
Aric


Aric Bills

2004-03-29, 6:51 pm

> If [$table yview] doesn't return {0 1}, for example,
> you know you need a vertical scrollbar.


Better make that {0.0 1.0} .

-Aric


Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com