Transparencia de controles
Posted: Tue Jan 02, 2018 5:17 pm
Los controles pueden ser transparentes o opacos.
Así, segun en el ejemplo seguido, uno de los Edits se muestra transparente.
Pero, porqué el FolderEx no lo es???
Porqué hereda el Brush ???
Querria evitar ese mal efecto que provoca con un Brush, se repite autodimensionado al control ventana i Folder.
Y el Button, tampoco se puede poner transparent o debe de ser otra clase de Button???
Así, segun en el ejemplo seguido, uno de los Edits se muestra transparente.
Pero, porqué el FolderEx no lo es???
Porqué hereda el Brush ???
Querria evitar ese mal efecto que provoca con un Brush, se repite autodimensionado al control ventana i Folder.
Y el Button, tampoco se puede poner transparent o debe de ser otra clase de Button???
Code: Select all
#include "FiveWin.ch"
FUNCTION Main()
local oWnd, oBrush
Local oEdit1, cVarEdit1 := "Edit1..."
DEFINE BRUSH oBrush FILENAME "C:\FWH\BITMAPS\Sea.bmp" STRETCH
DEFINE WINDOW oWnd FROM 1, 1 TO 800, 1450 PIXEL BRUSH oBrush
// DEFINE DIALOG oWnd FROM 0, 0 TO 800, 1450 PIXEL BRUSH oBrush
// oWnd:lTruePixel := .T. //Para DIALOG
@ 325,25 EDIT oEdit1 VAR cVarEdit1 SIZE 300,22 LIMITTEXT BY 30 CHARS PIXEL OF oWnd
oEdit1:lTransparent := .T.
ACTIVATE WINDOW oWnd ON INIT HazControls( oWnd )
// ACTIVATE DIALOG oWnd ON INIT HazControls( oWnd )
Return Nil
//----------------------------------------------------------------------------//
Function HazControls( oWnd )
local oFldr, oBtn
Local oEdit2, cVarEdit2 := "Edit2..."
Local oEdit3, cVarEdit3 := "Edit3..."
oFldr := TFolderEx():New( 0, 0,600,250, oWnd,, .T., .F., {"Prime","Segu","Terce","Quart","Five","My Dialog"},,, 0,,,,, .F., 0,,, .F., "TOP",,, .F.,,, .T.,, .F.,, "oFldr" )
oFldr:lTransparent := .T.
@ 25,25 BUTTON oBtn PROMPT "&FotoFons" OF oFldr:aDialogs[1] SIZE 100, 30 PIXEL
oBtn:lTransparent := .T.
@ 75,25 EDIT oEdit2 VAR cVarEdit2 SIZE 300,22 LIMITTEXT BY 30 CHARS PIXEL OF oFldr:aDialogs[1]
oEdit2:lTransparent := .T.
@ 275,25 EDIT oEdit3 VAR cVarEdit3 SIZE 300,22 LIMITTEXT BY 30 CHARS PIXEL OF oWnd
Return nil