Transparencia de controles

Transparencia de controles

Postby Xevi » 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???

Code: Select all  Expand view

#include ""

   local oWnd, oBrush
   Local oEdit1, cVarEdit1 := "Edit1..."


   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

Un Saludo,

Aprendiz de la vida!!!
User avatar
Posts: 108
Joined: Wed Nov 29, 2017 11:42 am
Location: Girona

Re: Transparencia de controles

Postby nageswaragunupudi » Fri Jan 05, 2018 6:22 am

Transparency is not implemented for BUTTON (TButton class) and BUTTONBMP (TButtonBmp class).
BTNBMP (TBtnBmp class) is painted transparently if :lTransparent is set to .T.
BTNBMP can also be painted translucently if required.

Implementation of transparency of Folder/Folderex and its dialogs over the main dialog's background is incomplete. We are reviewing this subject and it may take some time.
Till then Folder/FolderEx may be designed as independent container of dialogs with their own brushes.

G. N. Rao.
Hyderabad, India
User avatar
Posts: 5498
Joined: Sun Nov 19, 2006 5:22 am
Location: India

Return to FiveWin para Harbour/xHarbour

Who is online

Users browsing this forum: ACC69 and 9 guests