1. RE: LV Right Align

Bob,

Try using setColumn function in win32lib (assuming you're using 
win32lib).  For example

setColumn(myListView, 1, {"",100,'>'})

Will set the first column in myListView to have a column width of 100 
with the row contents right aligned.  A "" for the first element of the 
sequence means not to change the column heading text.  There's a good 
definition of this routine in the win32lib docs.

HTH,

Jonas
rswiston at hotmail.com wrote:
> Anyone know how to "right" align an entire column of a ListView control? 
>  A 
> simple question?  I hope so!
> 
> -Bob Swiston
> 
>

new topic     » topic index » view message » categorize

2. RE: LV Right Align

Thanks Jonas, but all I got was an error message that said:
tk_mem.e:97 in function acquire_mem()
sequence to be poked must only contain atoms

However, I did use a getTextExtent function to determine the length of my 
string in pixels, then added the correct number of spaces in front of the 
string to simulate the appearence of right justification.

If you can think of any reason for the error message or a better way to 
right justify than what I have done, please let me know.

-Bob Swiston

>From: Jonas  Temple <jktemple at yhti.net>
>Subject: RE: LV Right Align
>Date: Fri,  2 Aug 2002 16:35:48 +0000
>
>
>Bob,
>
>Try using setColumn function in win32lib (assuming you're using
>win32lib).  For example
>
>setColumn(myListView, 1, {"",100,'>'})
>
>Will set the first column in myListView to have a column width of 100
>with the row contents right aligned.  A "" for the first element of the
>sequence means not to change the column heading text.  There's a good
>definition of this routine in the win32lib docs.
>
>HTH,
>
>Jonas
>rswiston at hotmail.com wrote:
> > Anyone know how to "right" align an entire column of a ListView control?
> >  A
> > simple question?  I hope so!
> >
> > -Bob Swiston
> >
> >
>
>
>

new topic     » goto parent     » topic index » view message » categorize

3. RE: LV Right Align

Bob,

What version of win32lib are you using?  Could you provide an example of 
the code causing the problem?

Jonas
rswiston at hotmail.com wrote:
> Thanks Jonas, but all I got was an error message that said:
> tk_mem.e:97 in function acquire_mem()
> sequence to be poked must only contain atoms
> 
> However, I did use a getTextExtent function to determine the length of 
> my 
> string in pixels, then added the correct number of spaces in front of 
> the 
> string to simulate the appearence of right justification.
> 
> If you can think of any reason for the error message or a better way to 
> right justify than what I have done, please let me know.
> 
> -Bob Swiston

new topic     » goto parent     » topic index » view message » categorize

4. RE: LV Right Align

Perhaps you used double-quotes around the > instead of single quotes?

Mike Sabal

>>> rswiston at hotmail.com 08/02/02 01:12PM >>>

Thanks Jonas, but all I got was an error message that said:
tk_mem.e:97 in function acquire_mem()
sequence to be poked must only contain atoms

new topic     » goto parent     » topic index » view message » categorize

Search



Quick Links

User menu

Not signed in.

Misc Menu