Page 1 of 1

xbrowse problem

PostPosted: Sun Nov 15, 2009 3:12 am
by Colin Haig
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

Re: xbrowse problem

PostPosted: Sun Nov 15, 2009 4:29 am
by nageswaragunupudi
This code works
Code: Select all  Expand view
 
WITH OBJECT oBrw:AddCol()
      :cHeader    := 'Header'
      :bEditValue := { || oDbf:Married }
      :SetCheck( { 'RED', 'GREEN' }, { |o,v| oDbf:Married := v, oDbf:Save() }, { 'Yes', 'No' } )
   END
 

Re: xbrowse problem

PostPosted: Sun Nov 15, 2009 4:53 am
by Colin Haig
Mr G. N. Rao.

Thank you for your help.


Cheers

Colin

Re: xbrowse problem

PostPosted: Sun Dec 20, 2009 6:01 am
by nageswaragunupudi
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: Select all  Expand view
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

Re: xbrowse problem

PostPosted: Sun Dec 20, 2009 8:10 am
by Antonio Linares
Rao,

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

Re: xbrowse problem

PostPosted: Mon Dec 21, 2009 5:15 am
by nageswaragunupudi
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: Select all  Expand view
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