DCPUSHBUTTONXP disable / enable change color
Posted: Tue Oct 09, 2018 2:35 am
Hi,
I have buttons on screen, and I do not know, how to prevent change color other buttons when some function from button is running.
When I use WHEN {||jelvbenable()} , then all buttons are disabled / cannot run function with it, it is ok. But when I select some function / click one from buttons, function starts , but other buttons changing colors when move mouse cursor before it, this changing colors.
Also when I clict to button, some proces start but when I moving with mouse on screen, after
How simpliest way to block color change when some process running ? Must I use two version of mousecolor or exist some better way. Thanks for any advices
Here part of code>
I have buttons on screen, and I do not know, how to prevent change color other buttons when some function from button is running.
When I use WHEN {||jelvbenable()} , then all buttons are disabled / cannot run function with it, it is ok. But when I select some function / click one from buttons, function starts , but other buttons changing colors when move mouse cursor before it, this changing colors.
Also when I clict to button, some proces start but when I moving with mouse on screen, after
How simpliest way to block color change when some process running ? Must I use two version of mousecolor or exist some better way. Thanks for any advices
Here part of code>
Code: Select all
LOCAL oVelketlacitka
* this button to show buttons on screen
@ vbhokr+(0*vbry)+(0*vbmy),5+(0*vbrx)+(0*vbmx) DCPUSHBUTTONXP PIXEL OBJECT oVelketlacitka ;
SIZE vblokr-10,(0.7*vblokr)-10 ;
CAPTION "RÝCHLA;VOĽBA" ;
FONT fontbtmenu2 ;
GRADIENT 0.2 ;
COLOR GRA_CLR_BLACK, {32, 178, 170} ; // nastavenie farby text/podklad
MOUSECOLOR {255,255,0},{ 0, 51,255} ;
CLICKCOLOR {0,0,0},{250, 128, 114} ;
BORDERCOLOR {204,212,204} ;
RADIUS 5 ;
ACTION {||lmojetlacitka:=mojetlacitka(),iif(lmojetlacitka,bitmapvypni(oDlgmain,aSize),bitmapzapni(oDlgmain,aSize)),DC_GetRefresh(GetList)} ;
TOOLTIP "Zobrazenie tlačítok pre rýchlu voľbu , rýchly výber funkcie" ;
CONFIG oConfigvb
*1.st. button
@ vbhokr+(0*vbry)+(0*vbmy),vblokr+(0*vbrx)+(0*vbmx) DCPUSHBUTTONXP PIXEL OBJECT oVelketlacitka ;
SIZE vbrx,vbry ;
CAPTION "LIST VLASTNÍCTVA;S;CHRONOLÓGIOU" ;
FONT fontbtmenu2 ;
BITMAP cestahlprg+"IKONY\LIST.GIF" ;
ALIGN 8 ;
OFFSET 10 ;
SCALE 1.0 ;
GRADIENT 0.2 ;
COLOR GRA_CLR_BLACK, {144,238,144} ; // nastavenie farby text/podklad
MOUSECOLOR {255,255,0},{ 0, 51,255} ;
CLICKCOLOR {0,0,0},{250, 128, 114} ;
BORDERCOLOR {204,212,204} ;
RADIUS 20 ;
ACTION {||iif(blokujokno=.F.,{Zvku(),blokokno(),if(AKTU_P3(),iif((olpsql=2),Wslv(2,,,.T.),Wslv_sql(2,,,.T.)),nil),unblokokno()},{}),oVelketlacitka:refresh()} ;
WHEN {||jelvbenable()} ;
MENUACTION {||Msgbox("List vlastníctva s chronológiou zmien")} ;
TOOLTIP "Klikni na zobrazenie ďalšieho menu" ;
CONFIG oConfigvb ;
HIDE {||!lmojetlacitka}
*2.nd button
@ vbhokr+(0*vbry)+(0*vbmy),vblokr+(1*vbrx)+(1*vbmx) DCPUSHBUTTONXP PIXEL OBJECT oVelketlacitka ;
SIZE vbrx,vbry ;
CAPTION "HĽADANIE ZMIEN;VLASTNÍKA,ÚČASTNÍKA" ;
FONT fontbtmenu2 ;
BITMAP cestahlprg+"IKONY\LUDIA.GIF" ;
ALIGN 8 ;
OFFSET 10 ;
SCALE 1.0 ;
GRADIENT 0.2 ;
COLOR GRA_CLR_BLACK, {255,255,153} ;
MOUSECOLOR {255,255,0},{ 0, 51,255} ;
CLICKCOLOR {0,0,0},{250, 128, 114} ;
BORDERCOLOR {204,212,204} ;
RADIUS 20 ;
ACTION {||iif(blokujokno=.F.,{blokokno(),iif((olpsql=2),HVZ(1,1,1,0,0,1,1,0,0),{OTVOROLPSQL(),HVZ_SQL(1,1,1,1,0,1,1,0,0),ZATVOROLPSQL()}),unblokokno()},{}),oVelketlacitka:refresh()} ;
WHEN {||jelvbenable()} ;
MENUACTION {||Msgbox("Vyhľadávanie zmien vlastníka, účastníka")} ;
TOOLTIP "Klikni na zobrazenie ďalšieho menu" ;
CONFIG oConfigvb ;
HIDE {||!lmojetlacitka}
DCREAD GUI SETAPPWINDOW PARENT @oDlgmain ;
TITLE "RAUKN Win"+verzia ;
OPTIONS GetOptions ;
EVAL {||NASTAVWRKN(),bitmapzapni(oDlgmain,aSize)}
FUNCTION JELVBENABLE() // this function only for test if lvbenable is .T./.F.
if lvbenable=.T.
return .T.
elseif lvbenable=.F.
return .F.
else
return .T.
endif
return .T.