Skip to content

CreateComboBox

Claude edited this page Oct 26, 2026 · 6 revisions

CreateComboBox

Command Index · BlitzPlus · Gadgets

CreateComboBox x%, y%, width%, height%, group%, style%=0  ; returns Int

Works in: BlitzPlus

Makes a drop-down list. It shows the selected entry and opens the list when clicked. Fill it with AddGadgetItem, and read what was picked with SelectedGadgetItem when a $401 event arrives.

Graphics 320, 240, 32, 2
win = CreateWindow("Combo", 10, 10, 300, 200, Desktop(), 3)
box = CreateComboBox(10, 10, 160, 24, win)
AddGadgetItem box, "Small"
AddGadgetItem box, "Medium"
AddGadgetItem box, "Large"
SelectGadgetItem box, 0
Repeat
	e = WaitEvent()
	If e = $401 Then SetGadgetText win, "Picked " + GadgetItemText(box, SelectedGadgetItem(box))
Until e = $803

CreateComboBox

Parameter Type Default Description
x Int required Horizontal position inside the group.
y Int required Vertical position inside the group.
width Int required Width of the box.
height Int required Height of the closed box.
group Int required Window, panel, tabber or canvas that holds it.
style Int 0 0, or 65536 to not follow the group when it is resized. Defaults to 0.

Returns: A handle for the combo box.

Differences and known gaps:

  • The user cannot type into it, only pick from the list.

Related commands

Command Index · BlitzPlus · Gadgets

Home · Command Index


Getting started

Language

Tools


Language Features
BlitzBasic
Blitz3D
BlitzPlus
Differences

Clone this wiki locally