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

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

Postby ukoenig » 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.
User avatar
ukoenig
 
Posts: 4043
Joined: Wed Dec 19, 2007 6:40 pm
Location: Germany

Postby nageswaragunupudi » Sat Apr 19, 2008 1: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.
Code: Select all  Expand view
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
nageswaragunupudi
 
Posts: 10308
Joined: Sun Nov 19, 2006 5:22 am
Location: India

Switching Brushes ON / OFF in xBrowse

Postby ukoenig » Sat Apr 19, 2008 3: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.
User avatar
ukoenig
 
Posts: 4043
Joined: Wed Dec 19, 2007 6:40 pm
Location: Germany


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 37 guests