[Gambas-user] How can I move "public sub" in other separated files?

Simone Gentili sensorario at ...626...
Sun Jun 27 14:46:29 CEST 2010


This is my "main" program.

PUBLIC SUB _new()
  disegnaLableChitarra()
  disegnaTastieraChitarra()
END


These are two subroutines but I want to have them in separated file. What I
have to do?
PUBLIC SUB disegnaLableChitarra()
  DIM lableChitarra AS Label
  lableChitarra = NEW Label(ME) AS "MiaLable"
  lableChitarra.Text = "La Chitarra"
  lableChitarra.Caption = "La Chitarra"
  lableChitarra.H = 33
  lableChitarra.W = 44
END

PUBLIC SUB disegnaTastieraChitarra()
DIM hButton AS Button
  DIM i AS Integer
  DIM j AS Integer
  FOR i = 1 TO 24
    FOR j = 1 TO 6
      hButton = NEW Button(ME) AS "Ilmiopulsante" & i
      hButton.Top = 20 * j + 200
      hButton.Left = 20 * i
      hButton.H = 20
      hButton.W = 20
      hButton.Caption = i
    NEXT
  NEXT
END



More information about the User mailing list