Pasta de c:\fwh1905\samples
08/03/2022 18:53 3.830 XBROWED.PRG
oliveiros junior wrote:Oi Karinha, obrigado pela resposta. O caso do SAY é o seguinte:
Criei uma dialog e pintei com o comando SetDlgGradient( { { 0.9, CLR_WHITE, CLR_WHITE }, { 0.1 , CLR_BLACK, CLR_BLACK }, .F. } ), que é 9/10 branco e 1/10 negro. Dai coloquei uma imagem e escrevi sobre a imagem, com um SAY. Na parte branca, aparece com o fundo branco, independente da cor que eu coloque, e na parte negra, aparece o fundo negro, independente da cor colocada para o fundo.
Att.,
Junior
SetDlgGradient( { { 0.9, CLR_WHITE, CLR_WHITE }, { 0.1 , CLR_BLACK, CLR_BLACK }, .F. } )
// C:\FWH..\SAMPLES\CAMILO.PRG
#include "FiveWin.ch"
#Define CLR_ORANGE nRGB( 255, 165, 000 ) //-> Orange - Laranja
#Define CLR_SOFTYELLOW nRGB( 255, 251, 225 )
FUNCTION Main()
LOCAL oDlg, oGroup, oSalida, oFont, oSkinB, aGrad
LOCAL lFivePro := .T.
LOCAL lDialog := .T.
LOCAL lObjects := .F.
LOCAL oRadMenu := 1
LOCAL cName := SPACE( 10 )
LOCAL cAddress := SPACE( 30 )
LOCAL oBtn, oGet1, oGet2
LOCAL nColor := 1
oSkinB = TSkinButton():New()
oSkinB:nClrBorder0_N := RGB( 249, 194, 179 )
oSkinB:nClrBorder1_N := RGB( 181, 61, 29 )
oSkinB:aClrNormal := { { 0.2, RGB( 000, 128, 000 ), RGB( 000, 128, 000 ) }, ;
{ 0.8, RGB( 109, 135, 100 ), RGB( 109, 135, 100 ) } }
SkinButtons( oSkinB )
SetGetColorFocus()
tGet():lDisColors := .F.
tGet():nClrTextDis := CLR_HBLUE
tGet():nClrPaneDis := CLR_WHITE
// aGrad := { { 1, CLR_WHITE, CLR_HCYAN } }
// aGrad := ( { { 0.9, CLR_WHITE, CLR_BLACK }, { 0.1 , CLR_WHITE, CLR_BLACK }, .F. } )
aGrad := ( { { 0.5, CLR_WHITE, CLR_BLACK }, { 0.5 , CLR_WHITE, CLR_BLACK }, .F. } )
DEFINE FONT oFont NAME "Ms Sans Serif" SIZE 00, -14 BOLD
DEFINE DIALOG oDlg FROM 8, 2 TO 25, 50 TITLE "Group Color by Camilo" ;
FONT oFont GRADIENT aGrad
oDlg:lHelpIcon := .F.
@ 1, 1 SAY "&Name:" OF oDlg COLORS CLR_CYAN, CLR_WHITE TRANSPARENT UPDATE
@ 1, 6 GET oGet1 VAR cName OF oDlg COLORS CLR_BLACK, CLR_WHITE UPDATE
@ 2, 1 SAY "&Address:" OF oDlg COLORS CLR_CYAN, CLR_WHITE TRANSPARENT ;
UPDATE
@ 2, 6 GET oGet2 VAR cAddress OF oDlg COLORS CLR_BLACK, CLR_WHITE UPDATE
@ 3, 9 GROUP oGroup TO 7, 20 LABEL "Group Color" OF oDlg ;
COLOR CLR_ORANGE, CLR_WHITE TRANSPARENT
@ 4, 9 RADIO oRadMenu PROMPT "&Novice", "A&vanced", "&Expert" OF oDlg
@ 6, 5 BUTTON oBtn PROMPT "&Color" OF oDlg SIZE 50, 12 ;
ACTION SET_COLOR( oGroup, nColor )
oBtn:cToolTip := "Cambiar Color del Group"
@ 6, 17 BUTTON oSalida PROMPT "&Salida" OF oDlg SIZE 50, 12 ;
ACTION( oDlg:End() ) CANCEL
oSalida:cToolTip := "salida - Exit - Cancelar"
ACTIVATE DIALOG oDlg CENTERED ON INIT( CTRLS_COLORS( oDlg ) )
oFont:End()
RETURN NIL
FUNCTION SET_COLOR( oGroup, nColor )
LOCAL oIni, oBrush, oBmp
LOCAL nTipo, cStyle, cFile, cLogo, nRow, nCol, lSelect
nColor := ChooseColor()
oGroup:SetColor( nColor, CLR_WHITE )
oGroup:Refresh()
RETURN( nColor )
// By Giovanny Vecchi
FUNCTION CTRLS_COLORS( f_oDlgContainer )
LOCAL lc_aCtrls := {}, lc_iFor := 0
LOCAL lc_aItemsRadio := {}
lc_aCtrls := f_oDlgContainer:aControls
FOR lc_iFor := 1 TO Len( lc_aCtrls )
IF ValType( lc_aCtrls[lc_iFor] ) == "O"
IF lc_aCtrls[lc_iFor]:ClassName() == "TRADIO"
aEval( lc_aCtrls[lc_iFor]:oRadMenu:aItems, ;
{|_oRadId|{ SetWindowTheme( _oRadId:hWnd, "", "" ), ;
_oRadId:SetColor( CLR_CYAN, CLR_WHITE ) } } )
ELSEIF lc_aCtrls[lc_iFor]:ClassName() == "TCHECKBOX"
// SetWindowTheme( lc_aCtrls[lc_iFor]:hWnd, "", "" )
// lc_aCtrls[lc_iFor]:SetColor( G_COLOR_SYS( 31 ), G_COLOR_SYS( 1 ) )
ENDIF
ENDIF
NEXT
RETURN NIL
// FIN -> kapiabafwh@gmail.com
aGrad := ( { { 0.5, CLR_WHITE, CLR_BLACK }, { 0.5 , CLR_WHITE, CLR_BLACK }, .T. } )
I would like to know if it is possible to assign an action when clicking just once on a cell in the xBrowser,
oBrw:bLClicked := { |row,col,flags,brw| youraction( ... ) }
another question is about the SetDlgGradient command, when dividing a screen as follows: SetDlgGradient( { { 0.9, CLR_WHITE, CLR_WHITE }, { 0.1 , CLR_BLACK, CLR_BLACK }, .F. } ) , the SAY commands placed on the screen remain the background color defined in SetDlgGradient, my question is, would it be possible to determine the background color of the SAY commands?
@ r,c SAY .... COLOR nClrText, nClrBack
Mr Rao, does it only work over the line?
Return to FiveWin for Harbour/xHarbour
Users browsing this forum: No registered users and 46 guests