PlanetSquires Forums

Please login or register.

Login with username, password and session length
Advanced search  

Author Topic: LIstview header height  (Read 352 times)

Elias Montoya

  • Senior Member
  • ***
  • Posts: 285
  • Feeling like creating a Linux compiler. :)
LIstview header height
« on: July 27, 2010, 02:49:54 PM »


 Is there an easy way to adjust the header of a listview to the size of the font?
I tried an example that works in the PB source code forums, but i wasnt able to port it
to Firefly.
Logged
Win7, iMac x64 Retina display 5K, i7-5820K 4.4 ghz, 32GB RAM, All updates applied. - Firefly 3.70.

Elias Montoya

  • Senior Member
  • ***
  • Posts: 285
  • Feeling like creating a Linux compiler. :)
Re: LIstview header height
« Reply #1 on: July 27, 2010, 03:00:13 PM »

Nevermind, i got it.

Correction... i got the header height correct, but when scrolling horizontally is a mess...
this is the code i added, in the CREATE for the form add this:

Global lpOldWndProc2 As Long
lpOldWndProc2 = SetWindowLong(GetWindow(HWND_LITERATURA_LISTVIEW1, %GW_CHILD),%GWL_WNDPROC,ByVal CodePtr(ListviewHeaderProc))
SendMessage GetWindow(HWND_LITERATURA_LISTVIEW1, %GW_CHILD), %WM_SIZE, 0, 0

And add the listview header procedure:

Function HeaderProc(ByVal hWnd As Long, ByVal wMsg As Long, ByVal wParam As Long, ByVal lParam As Long) As Long
    Select Case wMsg
        Case %WM_SIZE : FF_Control_SetSize(hWnd, 700, 60)
    End Select
    Function = CallWindowProc( lpOldWndProc2, hWnd, wMsg, wParam, lParam)
End Function


 How to correct the Scrolling mess?? :P
« Last Edit: July 27, 2010, 03:08:24 PM by Elias Montoya »
Logged
Win7, iMac x64 Retina display 5K, i7-5820K 4.4 ghz, 32GB RAM, All updates applied. - Firefly 3.70.