I made a small Pickcolor
But I not Know how return the color Rgb
it create a box with 48 colors
and with FLATBTN we can click on each color and it must return the rgb color of a colors array but there is something not run well
we can create it also with xbrowse...
But I not Know how return the color Rgb
it create a box with 48 colors
and with FLATBTN we can click on each color and it must return the rgb color of a colors array but there is something not run well
we can create it also with xbrowse...
#include "fivewin.ch"
#include "constant.ch"
Function test()
Local oDlgColor
Local nBottom := 12
Local nRight := 8
Local nWidth := Max( nRight * DLG_CHARPIX_W, 180 )
Local nHeight := nBottom * DLG_CHARPIX_H
local aColors := { rgb( 255, 127, 127), rgb( 255, 255, 127), rgb( 127, 255, 127),;
rgb( 0, 255, 127), rgb( 127, 255, 255), rgb( 0, 127, 255),;
rgb( 255, 127, 191), rgb( 255, 127, 255), rgb( 255, 0, 0),;
rgb( 255, 255, 0), rgb( 127, 255, 0), rgb( 0, 255, 63),;
rgb( 0, 255, 255), rgb( 0, 127, 191), rgb( 127, 127, 191),;
rgb( 255, 0, 255), rgb( 127, 63, 63), rgb( 255, 127, 63),;
rgb( 0, 255, 0), rgb( 0, 127, 127), rgb( 0, 63, 127),;
rgb( 127, 127, 255), rgb( 127, 0, 63), rgb( 255, 0, 127),;
rgb( 127, 0, 0), rgb( 255, 127, 0), rgb( 0, 127, 0),;
rgb( 0, 127, 63), rgb( 0, 0, 255), rgb( 0, 0, 159),;
rgb( 127, 0, 127), rgb( 127, 0, 255), rgb( 63, 0, 0),;
rgb( 127, 63, 0), rgb( 0, 63, 0), rgb( 0, 63, 63),;
rgb( 0, 0, 127), rgb( 0, 0, 63), rgb( 63, 0, 63),;
rgb( 63, 0, 127), rgb( 0, 0, 0), rgb( 127, 127, 0),;
rgb( 127, 127, 63), rgb( 127, 127, 127), rgb( 63, 127, 127),;
rgb( 191, 191, 191), rgb( 63, 0, 63), rgb( 255, 255, 255) }
Local aGetcolor[48]
Local nTop:= 1
Local nCol:= 1
DEFINE DIALOG oDlg ;
TITLE "Color Pick" ;
SIZE nWidth, nHeight TRANSPARENT PIXEL
k=0
For n=1 to 48
bAction := ColorReturn(n,aColors)
@ ntop,ncol FLATBTN aGetcolor[n] PROMPT "X" OF oDlg SIZE 8,8 COLOR aColors[n],aColors[n] ACTION bAction
k+=1
nCol+= 10
If k = 8
nCol:= 1
k:=0
nTop:= nTop+10
endif
next
ACTIVATE DIALOG oDlg
RETURN NIL
function ColorReturn(ncolor,aColors)
return { || msginfo( aColors[nColor]) }Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)
I use : FiveWin for Harbour March-April 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
I use : FiveWin for Harbour March-April 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
























