Uwe..
#include "fivewin.ch"
#include "tselex.ch"
function Main()
local oWnd
local oSelex, oFont
local nOption1 := 1
local nOption2 := 1
local nOption3 := 6
define window oWnd
define font oFont Name "Arial Black" size 8, 14
@ 20, 10 SELEX nOption1 OF oWnd PIXEL SIZE 500, 50;
GRADIENT INTRACK { { 1, nRGB( 0, 255, 0 ), nRGB( 255, 0, 0 ) } };
ITEMS "0", "10", "20", "30", "40", "50", "60", "70", "80", "90", "100";
THUMBSIZE 30, 30 ROUNDSIZE 5 ;
COLOR THUMB CLR_WHITE FONT oFont
@ 100, 10 SELEX oSelex VAR nOption2 OF oWnd PIXEL SIZE 500, 50;
GRADIENT INTRACK { { 1, nRGB( 0, 255, 0 ), nRGB( 0, 255, 0 ) } };
ITEMS "0", "10", "20", "30", "40", "50", "60", "70", "80", "90", "100";
THUMBSIZE 30, 30 ROUNDSIZE 5 ;
FONT oFont;
ACTION ChangeColor( oSelex )
@ 180, 10 SELEX nOption3 OF oWnd PIXEL SIZE 500, 50;
GRADIENT INTRACK { { 1/2, nRGB( 0, 0, 255 ), nRGB( 0, 255, 0 ) }, ;
{ 1/2, nRGB( 0, 255, 0 ), nRGB( 255, 0, 0 ) } };
ITEMS "-50", "-40", "-30", "-20", "-10", "0", "10", "20", "30", "40", "50";
THUMBSIZE 30, 30 ROUNDSIZE 5 ;
FONT oFont
activate window oWnd
oFont:End()
return nil
FUNCTION ChangeColor( oSelex )
local nStep := 255 / Len( oSelex:aOptions )
local nColor := nStep * oSelex:nOption
oSelex:aGradIn = { { 1, nRGB( 0, 255, 0 ), nRGB( nColor, 255 - nColor, 0 ) } }
return nil