xbrowse problem

xbrowse problem

Postby Colin Haig » Sun Nov 15, 2009 3: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
Colin Haig
 
Posts: 310
Joined: Mon Oct 10, 2005 5:10 am

Re: xbrowse problem

Postby nageswaragunupudi » Sun Nov 15, 2009 4:29 am

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
 
Regards

G. N. Rao.
Hyderabad, India
User avatar
nageswaragunupudi
 
Posts: 10248
Joined: Sun Nov 19, 2006 5:22 am
Location: India

Re: xbrowse problem

Postby Colin Haig » Sun Nov 15, 2009 4:53 am

Mr G. N. Rao.

Thank you for your help.


Cheers

Colin
Colin Haig
 
Posts: 310
Joined: Mon Oct 10, 2005 5:10 am

Re: xbrowse problem

Postby nageswaragunupudi » Sun Dec 20, 2009 6: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: 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
Regards

G. N. Rao.
Hyderabad, India
User avatar
nageswaragunupudi
 
Posts: 10248
Joined: Sun Nov 19, 2006 5:22 am
Location: India

Re: xbrowse problem

Postby Antonio Linares » Sun Dec 20, 2009 8:10 am

Rao,

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

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 41314
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: xbrowse problem

Postby nageswaragunupudi » Mon Dec 21, 2009 5: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: 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
 
Regards

G. N. Rao.
Hyderabad, India
User avatar
nageswaragunupudi
 
Posts: 10248
Joined: Sun Nov 19, 2006 5:22 am
Location: India


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 95 guests