FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Pocket PC "Resize" event for tcbrowse column
Posts: 10
Joined: Sat Dec 22, 2007 12:02 AM
"Resize" event for tcbrowse column
Posted: Wed May 06, 2009 03:25 PM

Hi,
What event gets triggered when the user resizes the column width of the tcbrowse control? I appreciate any help.

Bert

Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: "Resize" event for tcbrowse column
Posted: Thu May 07, 2009 12:56 AM

Bert,

Class TCBrowse does not send any specific notification for such event.

What action do you need to do on such event ? We may provide you some info about how to do it :-)

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 10
Joined: Sat Dec 22, 2007 12:02 AM
Re: "Resize" event for tcbrowse column
Posted: Thu May 07, 2009 01:40 AM

Hi,

This is just a cosmetic thing. I have a dialog with two "identical" grids. I want the grids to be of the same column widths all the time. So, I need to know if the user resizes the first grid so i can update the other one.

Thanks
Bert

Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: "Resize" event for tcbrowse column
Posted: Thu May 07, 2009 02:12 AM
Bert,

You could easily modify Class TWBrowse Method LButtonUp() to fire such notification. Here I show you how to modify it. You may need to add a new DATA bColResized:
Code (fw): Select all Collapse
METHOD LButtonUp( nRow, nCol, nFlags ) CLASS TWBrowse

   if ::lDrag
      return Super:LButtonUp( nRow, nCol, nFlags )
   endif

   if ::lCaptured
      ::lCaptured = .f.
      ReleaseCapture()
      ::VertLine()
      If ! Empty( ::bColResized )  // new !
         Eval( ::bColResized, Self )  // new !
      endif  // new !
   endif

   Super:LButtonUp( nRow, nCol, nFlags )

return nil

oBrowse:bColResized = { | oBrowse | ... your code ... }
regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 10
Joined: Sat Dec 22, 2007 12:02 AM
Re: "Resize" event for tcbrowse column
Posted: Thu May 07, 2009 02:58 AM

Antonio, thanks a lot. This should do it. Have a nice day.

Bert

Continue the discussion