Combobox.bac
Page last edited 3,279 days ago
From bigbass code
Jump to navigation
Jump to search
File:Combobox.png File:Combobox2.png
' combobox.bac
' Include the files for making a GUI. INCLUDE "hug.bac" INIT
' we want to "echo out" which combobox was pressed ' this could launch another app use GRAB$
'----------------------- SUB My_combobox_demo() '-----------------------
Combobox_selected$ = GRAB$(My_combobox) PRINT Combobox_selected$ END SUB
' 1.) Create your main working window, 250 pixels wide x 100 pixels high Mainwin = WINDOW( "BaCon combobox", 250, 100 )
' remember create, ATTACH ,CALLBACK ,SUB
Menu_label = MARK("Select an option from the Menu" , 220, 30) ATTACH( Mainwin, Menu_label, 5, 0 )
My_combobox = COMBO("First choice", 180, 30) TEXT(My_combobox ,"Second choice" ) TEXT(My_combobox ,"Third choice" ) ATTACH( Mainwin, My_combobox, 5, 30 ) CALLBACK(My_combobox, My_combobox_demo)
DISPLAY