FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour xbrowse problem
Posts: 310
Joined: Mon Oct 10, 2005 05:10 AM
xbrowse problem
Posted: Sun Nov 15, 2009 03:12 AM

Hi All

This code work

oCol := oLbx:AddCol()
oCol:AddResource("GREEN")
oCol:AddResource("RED")
oCol:cHeader  := "Started"
oCol:bBmpData   := { || iif(oProject:prjstart, 1, 2) }
oCol:bStrData   := { || iif( oProject:prjstart, "Yes", "No ")}
oCol:bEditValue := { || oProject:prjstart }
oCol:nDataStyle := oCol:DefStyle( AL_RIGHT, .T.)
oCol:nEditType := EDIT_LISTBOX
oCol:aEditListTxt   := { "Yes", "No"}
oCol:aEditListBound := { TRUE, FALSE }
oCol:bOnPostEdit := {|o, v| oProject:prjstart := v ,oProject:save(),oLbx:Refresh()  }

but this code does not

 oCol := oLbx:AddCol()
 oCol:cHeader  := "Started"
 oCol:SetCheck( { "GREEN", "RED" }, {|o, v| (oProject:prjstart := v) } )
 oCol:bStrData        := { || If( oProject:prjstart, "Yes", "No" ) }
 oCol:nDataStrAlign   := AL_RIGHT

//-------------------------------------------------------------------------------------//
Another odd thing is when I select the dropdown listbox (yes , no) as soon as I move the
mouse to make a selection the values in the cells above and below disappear but refresh when
I double click on either option.

Cheers

Colin

Posts: 10733
Joined: Sun Nov 19, 2006 05:22 AM
Re: xbrowse problem
Posted: Sun Nov 15, 2009 04:29 AM
This code works
Code (fw): Select all Collapse
   
WITH OBJECT oBrw:AddCol()
      :cHeader    := 'Header'
      :bEditValue := { || oDbf:Married }
      :SetCheck( { 'RED', 'GREEN' }, { |o,v| oDbf:Married := v, oDbf:Save() }, { 'Yes', 'No' } )
   END
Regards



G. N. Rao.

Hyderabad, India
Posts: 310
Joined: Mon Oct 10, 2005 05:10 AM
Re: xbrowse problem
Posted: Sun Nov 15, 2009 04:53 AM

Mr G. N. Rao.

Thank you for your help.

Cheers

Colin

Posts: 10733
Joined: Sun Nov 19, 2006 05:22 AM
Re: xbrowse problem
Posted: Sun Dec 20, 2009 06:01 AM
Colin Haig wrote:
Another odd thing is when I select the dropdown listbox (yes , no) as soon as I move the
mouse to make a selection the values in the cells above and below disappear but refresh when
I double click on either option.
Colin


This is a problem since Kinetic scrolling was introduced in FWH908.

If we comment out the line
Code (fw): Select all Collapse
 TrackMouseEvent( ::hWnd, TME_LEAVE )

in the METHOD MouseMove(), this problem is solved.
But this may have adverse effect on the Kinetic scrolling logic.

Mr. Antonio may please advise. The above problem can be seen in the \fwh\samples\mallorca.prg
Regards



G. N. Rao.

Hyderabad, India
Posts: 44162
Joined: Thu Oct 06, 2005 05:47 PM
Re: xbrowse problem
Posted: Sun Dec 20, 2009 08:10 AM

Rao,

We are going to review it asap, thanks! :-)

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 10733
Joined: Sun Nov 19, 2006 05:22 AM
Re: xbrowse problem
Posted: Mon Dec 21, 2009 05:15 AM
This is a working fix ( though definitely not an elegant one), for versions from FWH908 onwards. This fix can be safely used till FiveWin provides the right fix.
Code (fw): Select all Collapse
METHOD Paint() CLASS TXBrowse

   local ...
   local ,,,
   local aInfo //:= ::DispBegin()    // Comment out ::DispBegin() here 
   local ...
   local ...


   if ::SelectedCol():oEditLbx != nil  // inserted
      return nil                              // inserted
   endif                                      // inserted
   aInfo := ::DispBegin()               // inserted 

   // Paint Background                 // original code
   aRect       := ::DataRect()       // original code
Regards



G. N. Rao.

Hyderabad, India

Continue the discussion