Export
Inherits TextArea
Public Const _Properties As String = "*,Type{TextTypes.*}=Nota"
Public Const _Group As String = "Form"
Public Const _Similar As String = "TextArea"
Public Const _DrawWith As String = "TextArea"
Property Type As Integer Use $type = 0' Gambas class file
Export
Public Const Nota As Integer = 0
Public Const Aviso As Integer = 2
Public Const Memo As Integer = 1
Public Const Confidential As Integer = 3![[Imagen: NdmpqMi.png]](https://i.imgur.com/NdmpqMi.png)
		
	Cita:Sin embargo, me suena que se podía hacer de otra manera resolviéndolo todo en la clase principal sin tener que declarar la segunda clase que contiene las constantes. ¿Lo he soñado?¿Alguien sabe cómo hacerlo?
Public Enum lunes, martes, miercoles, jueves, viernes, sabado, domingoPublic Sub Main()
  Dim cerveza As BebidaCerveza
  cerveza = New BebidaCerveza(BebidaCerveza.GUINNESS, Vaso.JARRA)
  cerveza.servir
EndPublic Enum AMBAR = 1, GUINNESS = 2, HEINEKEN = 3
Private $unvaso As Vaso
Private $marca As Integer
Private smarca As String
Public Sub _new(marca As Integer, medida As Integer)
  $marca = marca
  smarca = Choose(marca, "AMBAR", "GUINNESS", "HEINEKEN")
  $unvaso = New Vaso(medida)
End
Public Sub servir()
  Print "Sirviendo " & $unvaso.getCentimetrosCubicos() & " cc. de cerveza " & smarca
EndPublic Enum JARRA = 500, TUBO = 250, TERCIO = 333, CANA = 200
Private $cc As Integer
Public Sub _new(cc As Integer)
  $cc = cc
End
Public Sub getCentimetrosCubicos() As Integer
  Return $cc
EndCita:
Sirviendo 500 cc. de cerveza GUINNESS
![[Imagen: 3ObJiUH.png]](https://i.imgur.com/3ObJiUH.png)
Export
Inherits TextArea
'Public Const _Properties As String = "*,Type{TextTypes.*}=Nota"
Public Const _Properties As String = "*,Type{Nota.Nota;Aviso;Memo;Confidential}=Nota"
Public Const _Group As String = "Form"
Public Const _Similar As String = "TextArea"
Public Const _DrawWith As String = "TextArea"
Public Const Nota As Integer = 0
Public Const Aviso As Integer = 1
Public Const Memo As Integer = 2
Public Const Confidential As Integer = 3
Property Type As Integer Use $type = 0Export
Inherits TextArea
Public Enum Nota, Aviso, Memo, Confidential
'Public Const _Properties As String = "*,Type{TextTypes.*}=Nota"
Public Const _Properties As String = "*,Type{Nota.Nota;Aviso;Memo;Confidential}=Nota"
Public Const _Group As String = "Form"
Public Const _Similar As String = "TextArea"
Public Const _DrawWith As String = "TextArea"
'Public Const Nota As Integer = 0
'Public Const Aviso As Integer = 1
'Public Const Memo As Integer = 2
'Public Const Confidential As Integer = 3
Property Type As Integer Use $type = 0