Comunidad Gambas-es
Filechooser: acceder a eventos - Versión para impresión

+- Comunidad Gambas-es (https://gambas-es.org)
+-- Foro: Gambas (https://gambas-es.org/forum-3.html)
+--- Foro: General (https://gambas-es.org/forum-4.html)
+--- Tema: Filechooser: acceder a eventos (/thread-289.html)

Páginas: 1 2


RE: Filechooser: acceder a eventos - cogier - 05-03-2021

Aquí hay un código que muestra 7 eventos.
Espero que esto le ayude.


Código:
' Gambas class file

FileChooser1 As FileChooser
VBox1 As VBox
TextArea1 As TextArea
Label1 As Label

Public Sub Form_Open()

  With Me
    .Arrangement = Arrange.Horizontal
    .Padding = 5
    .H = 490
    .W = 1000
  End With

  With FileChooser1 = New FileChooser(Me) As "FileChooser1"
    .ShowButton = True
    .Expand = True
  End With

  With VBox1 = New VBox(Me)
    .Expand = True
  End With

  With TextArea1 = New TextArea(VBox1) As "TextArea1"
    .Expand = True
  End With

  With Label1 = New Label(VBox1) As "Label1"
    .Font.Bold = True
    .Alignment = Align.Center
    .Font.Size = 16
    .H = 28
  End With

End

Public Sub FileChooser1_Activate()

  TextArea1.Text &= "Activate" & gb.Newline

End

Public Sub FileChooser1_Arrange()

  TextArea1.Text &= "Arrange" & gb.Newline

End

Public Sub FileChooser1_BeforeArrange()

  TextArea1.Text &= "BeforeArrange" & gb.Newline

End

Public Sub FileChooser1_Cancel()

  TextArea1.Text &= "Cancel" & gb.Newline

End

Public Sub FileChooser1_Change()

  TextArea1.Text &= "Change" & gb.Newline

End

Public Sub FileChooser1_Enter()

  Label1.Text = "Enter"

End

Public Sub FileChooser1_Leave()

  Label1.text = "Leave"

End