Listbox truncating item names


Tweet
(Posted 8 months ago) lavalamp

Hi, seeking a solution to my ComboBox issues on MacOS, decided to give Listbox in a window a go, found the below example code, but on MacOS the names are truncated, can this be resolved?

Import MaxGui.Drivers

AppTitle = "ListBox Example"

Global window:TGadget = CreateWindow( AppTitle, 100, 100, 100, 200, Null, WINDOW_TOOL)

    Global listbox:TGadget = CreateListBox( 0, 0, ClientWidth(window), ClientHeight(window), window )
    SetGadgetLayout listbox, EDGE_ALIGNED, EDGE_ALIGNED, EDGE_ALIGNED, EDGE_ALIGNED

    SetGadgetIconStrip listbox, LoadIconStrip("toolbar.png")

    AddGadgetItem listbox, "New", GADGETITEM_NORMAL, 0, "Create something."
    AddGadgetItem listbox, "Open", GADGETITEM_NORMAL, 1, "Open something."
    AddGadgetItem listbox, "Save", GADGETITEM_NORMAL, 2, "Save something.", "Extra Item Object!"
    AddGadgetItem listbox, "No Icon", GADGETITEM_NORMAL, -1, "This should not have an icon set."

SelectGadgetItem listbox, 2

While WaitEvent()
    Print CurrentEvent.ToString()
    Select EventID()
        Case EVENT_WINDOWCLOSE, EVENT_APPTERMINATE;End

        Case EVENT_GADGETSELECT
            SetStatusText window, "Selected Item Index: " + EventData()
    End Select
Wend

Reply To Topic (minimum 10 characters)

Please log in to reply