FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour A Switch for the new oLbx:aCols[2]:oBrush := oBrush ?
Posts: 4043
Joined: Wed Dec 19, 2007 06:40 PM
A Switch for the new oLbx:aCols[2]:oBrush := oBrush ?
Posted: Sat Apr 19, 2008 12:34 PM

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.
Posts: 10733
Joined: Sun Nov 19, 2006 05:22 AM
A Switch for the new oLbx:aCols[2]:oBrush := oBrush ?
Posted: Sat Apr 19, 2008 01:29 PM
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.
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
Posts: 4043
Joined: Wed Dec 19, 2007 06:40 PM
Switching Brushes ON / OFF in xBrowse
Posted: Sat Apr 19, 2008 03:42 PM

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.

Continue the discussion