Unknown PickColor()

Post Reply
Natter
Posts: 1241
Joined: Mon May 14, 2007 9:49 am

Unknown PickColor()

Post by Natter »

Hi,

I tried to compile the testbtnclr.prg example, however, I received a message about the presence of an unknown PickColor() function. Why?

FWH 23.07
User avatar
Silvio.Falconi
Posts: 7134
Joined: Thu Oct 18, 2012 7:17 pm
Been thanked: 1 time

Re: Unknown PickColor()

Post by Silvio.Falconi »

It Is no function
It Is a class inside tbtnclr class
The call for the tpickcolor Is explain on the tbtnclr source code.
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)
I use : FiveWin for Harbour November 2023 - January 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
User avatar
Jimmy
Posts: 1740
Joined: Thu Sep 05, 2019 5:32 am
Location: Hamburg, Germany
Has thanked: 2 times

Re: Unknown PickColor()

Post by Jimmy »

hi,
Natter wrote:unknown PickColor() function.
it seems not in LIB, but it is under c:\fwh\source\function\pickcolor.prg
greeting,
Jimmy
Natter
Posts: 1241
Joined: Mon May 14, 2007 9:49 am

Re: Unknown PickColor()

Post by Natter »

Yes, I see. It just appears in the example as a public function, which is why I asked :?

Code: Select all | Expand

@ 30,10 BTNCLR oBtnColor SIZE 45,25 of oDlg PIXEL COLORSEL nColor ;
             ACTION  (oBtnColor:nColorSel:= PickColor( nColor, oBtnColor),;
                      oBtnColor:refresh())
User avatar
Silvio.Falconi
Posts: 7134
Joined: Thu Oct 18, 2012 7:17 pm
Been thanked: 1 time

Re: Unknown PickColor()

Post by Silvio.Falconi »

Go go the class
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)
I use : FiveWin for Harbour November 2023 - January 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
User avatar
Jimmy
Posts: 1740
Joined: Thu Sep 05, 2019 5:32 am
Location: Hamburg, Germany
Has thanked: 2 times

Re: Unknown PickColor()

Post by Jimmy »

hi Natter,
Natter wrote:Yes, I see. It just appears in the example as a public function, which is why I asked :?
it "seems" me that Function PickColor() is not used any more (old Sample)
now we have CLASS Class TPickerColor() as Silvio say
greeting,
Jimmy
User avatar
Silvio.Falconi
Posts: 7134
Joined: Thu Oct 18, 2012 7:17 pm
Been thanked: 1 time

Re: Unknown PickColor()

Post by Silvio.Falconi »

Try It please


Code: Select all | Expand

Function PickColor(nColor,oControl)
local oPick

oPick:= TPickerColor():New(nColor,oControl)
oPick:Dialog()

IF  oPick:Activate()
    IF oPick:oDlgPickColor:nresult == IDOK
      return oPick:nClrReturn
   endif
Endif

RETURN NIL
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)
I use : FiveWin for Harbour November 2023 - January 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
Post Reply