Label.bac

Page last edited 3,279 days ago
From bigbass code
Jump to navigation Jump to search

File:Label.png


' label.bac
' Include the files for making a GUI.
INCLUDE "hug.bac"
INIT

' 1.) Create your main working window, 250 pixels wide x 100 pixels high
Mainwin = WINDOW( "BaCon Title Bar", 250, 100 )

' 2. ) Create a label Hello BaCon! with text, 150 x 30
My_label = MARK( "This is static text", 150, 30 )

' 3.) Attach the label to the main window
ATTACH( Mainwin, My_label, 50, 20 )

' 4.) Create a button
My_btn = STOCK( "gtk-yes", 80, 25)

' 5.) Attach button to the main window
ATTACH( Mainwin, My_btn, 10, 60 )

' 6.) Make button do something
CALLBACK( My_btn, QUIT)

'7.) Create a button.
My_chk = STOCK("gtk-cancel", 80, 25)
ATTACH( Mainwin, My_chk, 155, 60 )

'8.)Make button do something
CALLBACK( My_chk, QUIT)
DISPLAY