FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour :bBmpData at TXBrowse Cols!
Posts: 445
Joined: Thu Feb 21, 2008 11:58 AM
:bBmpData at TXBrowse Cols!
Posted: Wed Mar 19, 2008 03:03 PM
Hi again my friends..


I need a little help!

This a example of my code:

...

oBrw:aCols[7]:addResource( "IMAGE_TRUE" )
oBrw:aCols[7]:addResource( "IMAGE_FALSE" )
oBrw:aCols[7]:bStrData := NIL
oBrw:aCols[7]:nDataStrAlign := AL_CENTER

oBrw:aCols[7]:bBmpData := {|| if( ( cAlias )->situacao, 1, 2 ) }

...


When the ( cAlias )->situacao is true, the xBrowse displays the image at position 1 of correct way.

But, when is false... it's not displays the image at position 2.

Where I'm wrong?
Peace and lighting!

JĂșlio CĂ©sar M. Ferreira

FWH 8.10 / xHB 1.1.0 / xDevStudio 0.72 / Pelles C 5.0.1 / SQLLIB 1.9
Posts: 10733
Joined: Sun Nov 19, 2006 05:22 AM
:bBmpData at TXBrowse Cols!
Posted: Wed Mar 19, 2008 05:33 PM

Mr JC

There is nothing wrong with your code. ( By the way it is not necessary to assign any value to nDataStrAlign in this case. When bStrData is nil, Bmp is shown centered. ).

Please check if your RC file contains resource with the exact spelling IMAGE_FALSE. If the browse does not find a resource with the given name, it shows blank.

You can also check this if oBrw:aCols[7]:addResource( "IMAGE_FALSE" ) is true or false. It it is true, the browse could successfully load the resource. If it is false, the browse could not load the resource.

Regards



G. N. Rao.

Hyderabad, India
Posts: 445
Joined: Thu Feb 21, 2008 11:58 AM
:bBmpData at TXBrowse Cols!
Posted: Wed Mar 19, 2008 07:06 PM
nageswaragunupudi wrote:Mr JC

There is nothing wrong with your code. ( By the way it is not necessary to assign any value to nDataStrAlign in this case. When bStrData is nil, Bmp is shown centered. ).

Please check if your RC file contains resource with the exact spelling IMAGE_FALSE. If the browse does not find a resource with the given name, it shows blank.

You can also check this if oBrw:aCols[7]:addResource( "IMAGE_FALSE" ) is true or false. It it is true, the browse could successfully load the resource. If it is false, the browse could not load the resource.


Dear Nageswara..

After adjusting my code.... this her!

oBrw:aCols[7]:bStrData := NIL
oBrw:aCols[7]:addResource( "IMAGE_TRUE" ) <- this is the true position with a correctly resource name
oBrw:aCols[7]:addResource( "IMAGE_FALSE" )<- this is the false position with a correctly resource name
oBrw:aCols[7]:bBmpData := {|| if( ( cAlias )->situacao, 1, 2 ) }



However, still an error :-)

I'm testing passing the code block with the value 1 or 2... it's displays both images! So, the resource name is correctly!
Peace and lighting!

JĂșlio CĂ©sar M. Ferreira

FWH 8.10 / xHB 1.1.0 / xDevStudio 0.72 / Pelles C 5.0.1 / SQLLIB 1.9
Posts: 10733
Joined: Sun Nov 19, 2006 05:22 AM
:bBmpData at TXBrowse Cols!
Posted: Thu Mar 20, 2008 12:40 AM

Surprising.

It works in the sample testxbr3.prg and also in my regular programs.

Will you please try this alternative code ?

oBrw:aCols[7]:bEditValue := { || (cAlias)->situacao }
oBrw:aCols[7]:SetCheck( { "IMAGE_TRUE", "IMAGE_FALSE" } )

in the place of all the lines you have coded ?

Regards



G. N. Rao.

Hyderabad, India
Posts: 445
Joined: Thu Feb 21, 2008 11:58 AM
:bBmpData at TXBrowse Cols!
Posted: Thu Mar 20, 2008 12:49 AM
nageswaragunupudi wrote:Surprising.

It works in the sample testxbr3.prg and also in my regular programs.

Will you please try this alternative code ?

oBrw:aCols[7]:bEditValue := { || (cAlias)->situacao }
oBrw:aCols[7]:SetCheck( { "IMAGE_TRUE", "IMAGE_FALSE" } )

in the place of all the lines you have coded ?


Yes NageswaraRao.... I do try!
Peace and lighting!

JĂșlio CĂ©sar M. Ferreira

FWH 8.10 / xHB 1.1.0 / xDevStudio 0.72 / Pelles C 5.0.1 / SQLLIB 1.9
Posts: 445
Joined: Thu Feb 21, 2008 11:58 AM
:bBmpData at TXBrowse Cols!
Posted: Thu Mar 20, 2008 12:59 AM

Ate the test, I get this error:

Message not found: TXBRWCOLUMN:SETCHECK

My version of fivewin don't have a method setCheck in the class TXBrwColumn!! :(

Peace and lighting!

JĂșlio CĂ©sar M. Ferreira

FWH 8.10 / xHB 1.1.0 / xDevStudio 0.72 / Pelles C 5.0.1 / SQLLIB 1.9
Posts: 10733
Joined: Sun Nov 19, 2006 05:22 AM
:bBmpData at TXBrowse Cols!
Posted: Thu Mar 20, 2008 01:18 AM

I am sorry. I should have seen the FWH version you are using. SetCheck is available from 8.03.

Possible that in version 6 the bBmpData is not handled properly. I do not have source code of xbrowse.prg that version. May be we can examine how the paintdata method is dealing with bBmpData.

Regards



G. N. Rao.

Hyderabad, India
Posts: 445
Joined: Thu Feb 21, 2008 11:58 AM
:bBmpData at TXBrowse Cols!
Posted: Thu Mar 20, 2008 01:33 AM
nageswaragunupudi wrote:I am sorry. I should have seen the FWH version you are using. SetCheck is available from 8.03.

Possible that in version 6 the bBmpData is not handled properly. I do not have source code of xbrowse.prg that version. May be we can examine how the paintdata method is dealing with bBmpData.


Yes! I will try to get the most updated version of fivewin

Thanks very much Nageswara!!
Peace and lighting!

JĂșlio CĂ©sar M. Ferreira

FWH 8.10 / xHB 1.1.0 / xDevStudio 0.72 / Pelles C 5.0.1 / SQLLIB 1.9

Continue the discussion