Prev: For Grafxsoft
Next: memo fields problem...
From: Lu on 22 Apr 2010 02:08 I have a problem with an old DataBrowser. Is it possible to color a cell with a condition from another cell. The cell is colored, but it only take the condidtion from the first row, so I tried self:Server:goto(self:Server:RECNO) but there is a endless loop. Is this possible with a DataBrowser or should I change to bBrowser?!? I tried this: METHOD PostInit(oWindow,iCtlID,oServer,uExtra) CLASS dtaTest SELF:Browser := _DataBrowser{SELF} oCol := ColorColumnAusbArt{4,#AusbArtV} oCol:Caption := "Name" oCol:EnableCellDraw(#ValidCheck) oCol:Width := 5 SELF:Browser:AddColumn(oCol) RETURN NIL METHOD ValidCheck( uValue ) CLASS ColorColumnAusbArt //Inherit from DataColumn self:Server:goto(self:Server:RECNO) //does not work IF self:Server:FIELDGET(#Type) == "F" self:CellTextColor := oFTextColor self:CellBackground := oFBackground endif RETURN NIL Thanks for any hints in advance. Lu
From: E®!k /!$$E® on 22 Apr 2010 02:13 > Is this possible with a DataBrowser or should I change to bBrowser?!? Yes and yes. It can be done with the databrowser but this is a Pita. If I recall right Gunnar Bless has showed us how to. If you google this newsgroup, I guess you will find some hints. And yes, you best upgrade to bBrowser as it is the superiour grid for VO. regards, Erik "Lu" <lu2k(a)hotmail.com> schreef in bericht news:9e180a77-70b6-4385-b53b-f25d391dea27(a)g11g2000yqe.googlegroups.com... > I have a problem with an old DataBrowser. Is it possible to color a > cell with a condition from another cell. The cell is colored, but it > only take the condidtion from the first row, so I tried > self:Server:goto(self:Server:RECNO) but there is a endless loop. > > Is this possible with a DataBrowser or should I change to bBrowser?!? > > I tried this: > > METHOD PostInit(oWindow,iCtlID,oServer,uExtra) CLASS dtaTest > > SELF:Browser := _DataBrowser{SELF} > > oCol := ColorColumnAusbArt{4,#AusbArtV} > oCol:Caption := "Name" > oCol:EnableCellDraw(#ValidCheck) > oCol:Width := 5 > SELF:Browser:AddColumn(oCol) > > RETURN NIL > > > METHOD ValidCheck( uValue ) CLASS ColorColumnAusbArt //Inherit from > DataColumn > > self:Server:goto(self:Server:RECNO) //does not work > > IF self:Server:FIELDGET(#Type) == "F" > self:CellTextColor := oFTextColor > self:CellBackground := oFBackground > endif > > RETURN NIL > > Thanks for any hints in advance. > > Lu > >
From: Dirk (Belgium) on 22 Apr 2010 03:29 Lu wrote: > I have a problem with an old DataBrowser. Is it possible to color a > cell with a condition from another cell. The cell is colored, but it > only take the condidtion from the first row, so I tried > self:Server:goto(self:Server:RECNO) but there is a endless loop. > > Is this possible with a DataBrowser or should I change to bBrowser?!? > > I tried this: > > METHOD PostInit(oWindow,iCtlID,oServer,uExtra) CLASS dtaTest > > SELF:Browser := _DataBrowser{SELF} > > oCol := ColorColumnAusbArt{4,#AusbArtV} > oCol:Caption := "Name" > oCol:EnableCellDraw(#ValidCheck) > oCol:Width := 5 > SELF:Browser:AddColumn(oCol) > > RETURN NIL > > > METHOD ValidCheck( uValue ) CLASS ColorColumnAusbArt //Inherit from > DataColumn > > self:Server:goto(self:Server:RECNO) //does not work > > IF self:Server:FIELDGET(#Type) == "F" > self:CellTextColor := oFTextColor > self:CellBackground := oFBackground > endif > > RETURN NIL > > Thanks for any hints in advance. > > Lu Lu, Try this: METHOD ValidCheck( uValue ) CLASS ColorColumnAusbArt IF uValue == "F" self:CellTextColor := oFTextColor self:CellBackground := oFBackground endif RETURN NIL Dirk --
From: Geoff Schaller on 22 Apr 2010 04:25 Lu, Databrowser is a mess. You can colour rows and cells and columns but the code is complex and requires substantial class alterations. We went through this back in 1999 - 2001. Then along came bBrowser and Databrowser was dumped. I did a lot of work after Gunnar Bless to make these work and I have completely deleted all these libraries and have no interest resurrecting them. Go bBrowser. Take the pain now and convert. You won't look back. Geoff "Lu" <lu2k(a)hotmail.com> wrote in message news:9e180a77-70b6-4385-b53b-f25d391dea27(a)g11g2000yqe.googlegroups.com: > I have a problem with an old DataBrowser. Is it possible to color a > cell with a condition from another cell. The cell is colored, but it > only take the condidtion from the first row, so I tried > self:Server:goto(self:Server:RECNO) but there is a endless loop. > > Is this possible with a DataBrowser or should I change to bBrowser?!? > > I tried this: > > METHOD PostInit(oWindow,iCtlID,oServer,uExtra) CLASS dtaTest > > SELF:Browser := _DataBrowser{SELF} > > oCol := ColorColumnAusbArt{4,#AusbArtV} > oCol:Caption := "Name" > oCol:EnableCellDraw(#ValidCheck) > oCol:Width := 5 > SELF:Browser:AddColumn(oCol) > > RETURN NIL > > > METHOD ValidCheck( uValue ) CLASS ColorColumnAusbArt //Inherit from > DataColumn > > self:Server:goto(self:Server:RECNO) //does not work > > IF self:Server:FIELDGET(#Type) == "F" > self:CellTextColor := oFTextColor > self:CellBackground := oFBackground > endif > > RETURN NIL > > Thanks for any hints in advance. > > Lu
From: Dirk (Belgium) on 22 Apr 2010 06:25
Lu, If you have not a lot of sources which retain on databrowser, and you have now the possibility to choose between databrowser and bBrowser, you have to choose bBrowser, like Geoff said so. But, things are more difficult if you have 1000 of screens based on databrowser (like me)... Dirk, Belgium Geoff Schaller wrote: > Lu, > > Databrowser is a mess. You can colour rows and cells and columns but > the code is complex and requires substantial class alterations. We > went through this back in 1999 - 2001. > > Then along came bBrowser and Databrowser was dumped. I did a lot of > work after Gunnar Bless to make these work and I have completely > deleted all these libraries and have no interest resurrecting them. > Go bBrowser. Take the pain now and convert. > > You won't look back. > > Geoff |