Interfaz gráfica de la clase (form)
' gambas class file
'by Postapase 26 enero 2017
'http://novatocodegambas.blogspot.com.uy/
'control fbcolor (foreground, background color)
Event CambioTrazo
Event CambioFondo
Event EnterTrazo
Event EnterFondo
Event Reseteo
Event EnterReseteo
Public Sub cbtnTrazo_Change()
Raise CambioTrazo
End
Public Sub cbtnFondo_Change()
Raise CambioFondo
End
Public Sub tbtnReseteo_Click()
Raise Reseteo
End
Public Sub cbtnTrazo_Enter()
Raise EnterTrazo
End
Public Sub cbtnFondo_Enter()
Raise EnterFondo
End
Public Sub tbtnReseteo_Enter()
Raise EnterReseteo
End
'by Postapase 26 enero 2017
'http://novatocodegambas.blogspot.com.uy/
'control fbcolor (foreground, background color)
Event CambioTrazo
Event CambioFondo
Event EnterTrazo
Event EnterFondo
Event Reseteo
Event EnterReseteo
Public Sub cbtnTrazo_Change()
Raise CambioTrazo
End
Public Sub cbtnFondo_Change()
Raise CambioFondo
End
Public Sub tbtnReseteo_Click()
Raise Reseteo
End
Public Sub cbtnTrazo_Enter()
Raise EnterTrazo
End
Public Sub cbtnFondo_Enter()
Raise EnterFondo
End
Public Sub tbtnReseteo_Enter()
Raise EnterReseteo
End
Clase fbcolor
' gambas class file
'by Postapase 26 enero 2017
'http://novatocodegambas.blogspot.com.uy/
'control fbcolor (foreground y background color)
Export
Inherits UserControl
Public Const _Properties As String = "*,Trazo{Color},Fondo{Color},TrazoPredeterminado{Color},FondoPredeterminado{Color}"
Public Const _DefaultEvent As String = "Modificacion"
Public Const _DefaultSize As String = "18,4"
Public Const _Group As String = "Chooser"
Event Reseteo
Event Modificacion
Property Trazo As Integer
Property Fondo As Integer
Property TrazoPredeterminado As Integer
Property FondoPredeterminado As Integer
Private $ffbcolor As Ffbcolor
Private $Trazo As Integer
Private $Fondo As Integer
Private $TrazoPredeterminado As Integer
Private $FondoPredeterminado As Integer
Public Sub _new()
$ffbcolor = New Ffbcolor(Me) As "Ev"
Me.Proxy = $ffbcolor
Reinicio()
End
Public Sub Ev_CambioTrazo()
$Trazo = $ffbcolor.cbtnTrazo.Value
Raise Modificacion
End
Public Sub Ev_CambioFondo()
$Fondo = $ffbcolor.cbtnFondo.Value
Raise Modificacion
End
Public Sub Ev_Reseteo()
Reinicio()
Raise Reseteo
End
Public Sub Reinicio()
$Fondo = $FondoPredeterminado
$Trazo = $TrazoPredeterminado
$ffbcolor.cbtnFondo.Value = $Fondo
$ffbcolor.cbtnTrazo.Value = $Trazo
End
Public Sub Ev_EnterTrazo()
$ffbcolor.cbtnTrazo.Tooltip = "Color de Trazo (clic para cambiar)"
End
Public Sub Ev_EnterFondo()
$ffbcolor.cbtnFondo.Tooltip = "Color de Fondo (clic para cambiar)"
End
Public Sub Ev_EnterReseteo()
$ffbcolor.tbtnReseteo.Tooltip = "Poner colores predeterminados"
End
Private Function Trazo_Read() As Integer
Return $Trazo
End
Private Sub Trazo_Write(Value As Integer)
$Trazo = Value
$ffbcolor.cbtnTrazo.Value = $Trazo
Raise Modificacion
End
Private Function Fondo_Read() As Integer
Return $Fondo
End
Private Sub Fondo_Write(Value As Integer)
$Fondo = Value
$ffbcolor.cbtnFondo.Value = $Fondo
Raise Modificacion
End
Private Function TrazoPredeterminado_Read() As Integer
Return $TrazoPredeterminado
End
Private Sub TrazoPredeterminado_Write(Value As Integer)
$TrazoPredeterminado = Value
Raise Modificacion
End
Private Function FondoPredeterminado_Read() As Integer
Return $FondoPredeterminado
End
Private Sub FondoPredeterminado_Write(Value As Integer)
$FondoPredeterminado = Value
Raise Modificacion
End
'by Postapase 26 enero 2017
'http://novatocodegambas.blogspot.com.uy/
'control fbcolor (foreground y background color)
Export
Inherits UserControl
Public Const _Properties As String = "*,Trazo{Color},Fondo{Color},TrazoPredeterminado{Color},FondoPredeterminado{Color}"
Public Const _DefaultEvent As String = "Modificacion"
Public Const _DefaultSize As String = "18,4"
Public Const _Group As String = "Chooser"
Event Reseteo
Event Modificacion
Property Trazo As Integer
Property Fondo As Integer
Property TrazoPredeterminado As Integer
Property FondoPredeterminado As Integer
Private $ffbcolor As Ffbcolor
Private $Trazo As Integer
Private $Fondo As Integer
Private $TrazoPredeterminado As Integer
Private $FondoPredeterminado As Integer
Public Sub _new()
$ffbcolor = New Ffbcolor(Me) As "Ev"
Me.Proxy = $ffbcolor
Reinicio()
End
Public Sub Ev_CambioTrazo()
$Trazo = $ffbcolor.cbtnTrazo.Value
Raise Modificacion
End
Public Sub Ev_CambioFondo()
$Fondo = $ffbcolor.cbtnFondo.Value
Raise Modificacion
End
Public Sub Ev_Reseteo()
Reinicio()
Raise Reseteo
End
Public Sub Reinicio()
$Fondo = $FondoPredeterminado
$Trazo = $TrazoPredeterminado
$ffbcolor.cbtnFondo.Value = $Fondo
$ffbcolor.cbtnTrazo.Value = $Trazo
End
Public Sub Ev_EnterTrazo()
$ffbcolor.cbtnTrazo.Tooltip = "Color de Trazo (clic para cambiar)"
End
Public Sub Ev_EnterFondo()
$ffbcolor.cbtnFondo.Tooltip = "Color de Fondo (clic para cambiar)"
End
Public Sub Ev_EnterReseteo()
$ffbcolor.tbtnReseteo.Tooltip = "Poner colores predeterminados"
End
Private Function Trazo_Read() As Integer
Return $Trazo
End
Private Sub Trazo_Write(Value As Integer)
$Trazo = Value
$ffbcolor.cbtnTrazo.Value = $Trazo
Raise Modificacion
End
Private Function Fondo_Read() As Integer
Return $Fondo
End
Private Sub Fondo_Write(Value As Integer)
$Fondo = Value
$ffbcolor.cbtnFondo.Value = $Fondo
Raise Modificacion
End
Private Function TrazoPredeterminado_Read() As Integer
Return $TrazoPredeterminado
End
Private Sub TrazoPredeterminado_Write(Value As Integer)
$TrazoPredeterminado = Value
Raise Modificacion
End
Private Function FondoPredeterminado_Read() As Integer
Return $FondoPredeterminado
End
Private Sub FondoPredeterminado_Write(Value As Integer)
$FondoPredeterminado = Value
Raise Modificacion
End
Dropbox fbcolor-0.1.1.tar.gz