A Switch for the new oLbx:aCols[2]:oBrush := oBrush ?

Post Reply
User avatar
ukoenig
Posts: 3981
Joined: Wed Dec 19, 2007 6:40 pm
Location: Germany
Contact:

A Switch for the new oLbx:aCols[2]:oBrush := oBrush ?

Post by ukoenig »

Hello,

In the new Tools, i added the new FWH 8.04 option
to select a brush for a defined Col.
Because everything can be done at runtime with preview,
it must be possible, that the user can switch the brush On and Off
like with transparent .T. or .F.

The normal code is just :

DEFINE BRUSH oBrush RESOURCE "WALL"
oLbx:aCols[2]:oBrush := oBrush

Is it possible, to make the brush visible or not visible ?

Regards

Uwe
Since 1995 ( the first release of FW 1.9 )
i work with FW.
If you have any questions about special functions, maybe i can help.
User avatar
nageswaragunupudi
Posts: 8017
Joined: Sun Nov 19, 2006 5:22 am
Location: India
Contact:

Post by nageswaragunupudi »

During runtime it is possible to assign a brush, change a brush or remove brush ( by assigning ocol:obrush := nil ).

On studying the code, the intention is that even a codeblock can be assigned to oBrush so that different rows can be painted with different brushes. Example oBrush := { || If( ordkeyno() % 2 == 0, oBrush1, oBrush2 }.
But due to a small bug this is now giving an error.

Mr Antonio.
This small correction given below will rectify the error and codeblocks will work for oBrush correctly.

Code: Select all

Present line 5360
      hBrush      := ::oBrush:hBrush
should be changed as
      hBrush      := oBrush:hBrush
With this correction CodeBlocks can be assigned to oCol:oBrush and it works perfectly. I made this correction in my copy and I am using this in my applications.
Regards

G. N. Rao.
Hyderabad, India
User avatar
ukoenig
Posts: 3981
Joined: Wed Dec 19, 2007 6:40 pm
Location: Germany
Contact:

Switching Brushes ON / OFF in xBrowse

Post by ukoenig »

Thank you very much,

I included the option and it works fine.
Now the user can choose a brush and test,
how it looks in relation to the rest of his settings.

Regards

Uwe
Since 1995 ( the first release of FW 1.9 )
i work with FW.
If you have any questions about special functions, maybe i can help.
Post Reply