Markup.bac
Page last edited 3,280 days ago
From bigbass code
Jump to navigation
Jump to search
' markup.bac ' equivilent gtkdialog 00.01-text_attributes ' With SUB routine example
INCLUDE "hug.bac" INIT
' ------------------------------- SUB LAUNCH_APP() ' ------------------------------ ' TEXT changes the text of a widget/My_label TEXT( My_label, result$) END SUB
' Create your main working window, 275 pixels wide x 100 pixels high Mainwin = WINDOW( " BaCon Using markup", 275, 100 ) result$ = CONCAT$("This is underlined text")
' Create a label with text, 180 x 30
My_label = MARK( "Color can be used too ", 180, 30 )
My_label2 = MARK( "Use-markup , which is cool.", 180, 30 )
' Attach the label to the main window ' at coordinates 50x 20y from top left corner ATTACH( Mainwin, My_label, 50, 10 ) ATTACH( Mainwin, My_label2, 50, 35 )
' --- BUTTONS --- My_btn = BUTTON( "Launch", 100, 25) ATTACH( Mainwin, My_btn, 5, 60 )
' Make an exit button My_close = STOCK("gtk-close", 100, 25) ATTACH(Mainwin, My_close, 140, 60)
' --- CALLBACKS --- CALLBACK( My_btn, LAUNCH_APP) CALLBACK( My_close, QUIT)
DISPLAY