1. Listview gridline problem with Win32Lib0.70.20
- Posted by Kondor_Attila Feb 19, 2011
- 1528 views
I use Openeuphoria 4.0 and Win32Lib 0.70.20 from now. Unfortunately the programs produce trouble, wherein Listview with gridline are. The gridlines disappear or increase twofold on vertical scrollbar mouse click. These programs work with Win32Lib 0.60.6 (and Euphoria 3.11)faultlessly.
Thanks for help!
-- lv-demo.exw include Win32Lib.ew without warning constant Window1 = createEx( Window, "Window1", 0, Default, Default, 247, 167, 0, 0 ) constant ListView1 = createEx( ListView, {{"ListView1",40,'^'}, {"Column1",50,'^'},{"Column2",50,'^'}}, Window1, 12, 8, 210, 115, or_all({LVS_REPORT,LVS_NOCOLUMNHEADER}),0) setLVStyle(ListView1, or_all({LVS_EX_GRIDLINES,LVS_EX_FULLROWSELECT,LVS_EX_ONECLICKACTIVATE,LVS_EX_FLATSB})) setFont(ListView1,"Times New Roman", 10, Normal) sequence IDElvItems integer IDElvItemNo IDElvItems = {"1","2","3","4","5","6","7","8","9","10","11","12"} for i=1 to length(IDElvItems) do IDElvItemNo = addLVItem( ListView1,0, IDElvItems[i]) end for WinMain( Window1,Normal )
2. Re: Listview gridline problem with Win32Lib0.70.20
- Posted by petelomax Feb 20, 2011
- 1432 views
I can confirm this goes equally wrong on 2.4. It also went wrong for me on 0.60.6
An improvement, though not perfect, is to add
procedure onScroll(integer self, integer event, sequence parms) repaintWindow(self) end procedure setHandler(ListView1, w32HScroll, routine_id("onScroll"))
HTH
Pete
3. Re: Listview gridline problem with Win32Lib0.70.20
- Posted by petelomax Feb 20, 2011
- 1480 views
After some more digging, this is a problem with XP, which M$ refused to fix. In fact it seems the code I posted above is the best that can be done. Eg point 4 of http://www.codeproject.com/KB/tips/BoxOTricks.aspx
There was a M$KB article mentioned alot, http://support.microsoft.com/kb/813791/en-us but as M$ decided it would only be fixed in Vista, they've removed it (presumably out of embarassment). They missed this though: http://support.microsoft.com/kb/835328 which I see has not been marked as fixed.
Regards, Pete
4. Re: Listview gridline problem with Win32Lib0.70.20
- Posted by Kondor_Attila Feb 20, 2011
- 1369 views
Thank You Pete!
The repaintWindow(self) helps as long as MS solves it.
Regards,
Attila
5. Re: Listview gridline problem with Win32Lib0.70.20
- Posted by petelomax Feb 20, 2011
- 1351 views
Thank You Pete!
Glad I could help. Actually, when I looked more carefully, there were I think 8 instances of this bug in Edita, so I added the following fix to Arwen, in SubProc():
elsif (msg=WM_HSCROLL or msg=WM_VSCROLL) then objectType = ObjectType[id] if objectType=ListView then -- added 20/2/2011 if and_bits(sendMessage(id, LVM_GETEXTENDEDLISTVIEWSTYLE, 0, 0),LVS_EX_GRIDLINES) then repaintWindow(id) end if
Unfortunately I have no idea what the equivalent fix for win32lib would look like.
The repaintWindow(self) helps as long as MS solves it.
Yeah, like I'm going to get the whole world to upgrade from XP to Windows 7. (Just last week I heard of someone who actually got sacked, some years ago this was, for recommending a company-wide upgrade from XP to Vista!)
Regards, Pete