1. Derek: ListView bug
- Posted by Greg Haberek <ghaberek at gmail.com> Sep 24, 2004
- 555 views
I ran into a rather frustrating ListView bug. When I create columns, I want some to be right-aligned. So I create my ListView as such:
constant MyLV = create( ListView, {{"Column1", 200, '<'},{"Column2", 200, '>'}}, MyWin, 0, 0, 200, 200, LVS_REPORT )
So I've arrived at a problem: Column2, which should be right-aligned, is centered! Hmm.... is there a fix or is it a Windows issue? I recall this working properly several versions ago, I'm sure something may have gotten messed up along the way. ~Greg
2. Re: Derek: ListView bug
- Posted by Derek Parnell <ddparnell at bigpond.com> Sep 24, 2004
- 548 views
Greg Haberek wrote: > > I ran into a rather frustrating ListView bug. When I create columns, I > want some to be right-aligned. So I create my ListView as such: > > }}} <eucode> > constant MyLV = create( ListView, {{"Column1", 200, '<'},{"Column2", > 200, '>'}}, MyWin, 0, 0, 200, 200, LVS_REPORT ) > </eucode> {{{ > > So I've arrived at a problem: Column2, which should be right-aligned, > is centered! Hmm.... is there a fix or is it a Windows issue? I recall > this working properly several versions ago, I'm sure something may > have gotten messed up along the way. Yep, that's a mistake I've made. Its easy to fix up though... In createEx() replace the line ... insertLVColumn( id, 0, 0, lvcol[i][3],lvcol[i][2], lvcol[i][1], i) with ... insertLVColumn( id, 0, 0, 0, 0, {lvcol[i][1],lvcol[i][2], lvcol[i][3]}, i) -- Derek Parnell Melbourne, Australia
3. Re: Derek: ListView bug
- Posted by Derek Parnell <ddparnell at bigpond.com> Sep 24, 2004
- 534 views
Derek Parnell wrote: [snip] > > In createEx() replace the line ... > > insertLVColumn( id, 0, 0, lvcol[i][3],lvcol[i][2], lvcol[i][1], i) > > with ... > > insertLVColumn( id, 0, 0, 0, 0, {lvcol[i][1],lvcol[i][2], lvcol[i][3]}, i) Which of course could also be written as ... insertLVColumn( id, 0, 0, 0, 0, lvcol[i][1..3], i) > -- > Derek Parnell > Melbourne, Australia > -- Derek Parnell Melbourne, Australia