"Resize" event for tcbrowse column

"Resize" event for tcbrowse column

Postby hterce » Wed May 06, 2009 3:25 pm

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

Bert
hterce
 
Posts: 10
Joined: Sat Dec 22, 2007 12:02 am

Re: "Resize" event for tcbrowse column

Postby Antonio Linares » 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
User avatar
Antonio Linares
Site Admin
 
Posts: 42122
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: "Resize" event for tcbrowse column

Postby hterce » Thu May 07, 2009 1: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
hterce
 
Posts: 10
Joined: Sat Dec 22, 2007 12:02 am

Re: "Resize" event for tcbrowse column

Postby Antonio Linares » Thu May 07, 2009 2: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: Select all  Expand view  RUN

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
User avatar
Antonio Linares
Site Admin
 
Posts: 42122
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: "Resize" event for tcbrowse column

Postby hterce » Thu May 07, 2009 2:58 am

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

Bert
hterce
 
Posts: 10
Joined: Sat Dec 22, 2007 12:02 am


Return to FiveWin for Pocket PC

Who is online

Users browsing this forum: No registered users and 2 guests