Bitte verwende nicht einfach irgendwelche Konstanten. Eine #SS_-Konstante steht für Static Styles und ComboBoxGadget ist kein Static Control. Dafür gibt es #CBS_-/#CB_-Konstanten.
Außerdem gibt es (wenn #PB_ComboBox_Editable aktiviert ist) im ComboBoxGadget ein StringGadget, welches du mit #ES_/#EM-Konstanten ansteuern kannst.
Hier ein paar Beispielcodes:
#PB_ComboBox_Editable & linksbündig:
Code: Alles auswählen
EnableExplicit
Define hComboEdit
If OpenWindow(0, 0, 0, 500, 400, "Window", #PB_Window_SystemMenu | #PB_Window_ScreenCentered)
ComboBoxGadget(1, 10, 10, 200, 20, #PB_ComboBox_Editable)
AddGadgetItem(1, -1, "123")
SetGadgetState(1, 0)
hComboEdit = FindWindowEx_(GadgetID(1), #Null, "Edit", #Null)
SetWindowLongPtr_(hComboEdit, #GWL_STYLE, GetWindowLongPtr_(hComboEdit, #GWL_STYLE) | #ES_LEFT)
Repeat
Until WaitWindowEvent() = #PB_Event_CloseWindow
EndIf
#PB_ComboBox_Editable & zentriert:
Code: Alles auswählen
EnableExplicit
Define hComboEdit
If OpenWindow(0, 0, 0, 500, 400, "Window", #PB_Window_SystemMenu | #PB_Window_ScreenCentered)
ComboBoxGadget(1, 10, 10, 200, 20, #PB_ComboBox_Editable)
AddGadgetItem(1, -1, "123")
SetGadgetState(1, 0)
hComboEdit = FindWindowEx_(GadgetID(1), #Null, "Edit", #Null)
SetWindowLongPtr_(hComboEdit, #GWL_STYLE, GetWindowLongPtr_(hComboEdit, #GWL_STYLE) | #ES_CENTER)
Repeat
Until WaitWindowEvent() = #PB_Event_CloseWindow
EndIf
#PB_ComboBox_Editable & rechtsbündig:
Code: Alles auswählen
EnableExplicit
Define hComboEdit
If OpenWindow(0, 0, 0, 500, 400, "Window", #PB_Window_SystemMenu | #PB_Window_ScreenCentered)
ComboBoxGadget(1, 10, 10, 200, 20, #PB_ComboBox_Editable)
AddGadgetItem(1, -1, "123")
SetGadgetState(1, 0)
hComboEdit = FindWindowEx_(GadgetID(1), #Null, "Edit", #Null)
SetWindowLongPtr_(hComboEdit, #GWL_STYLE, GetWindowLongPtr_(hComboEdit, #GWL_STYLE) | #ES_RIGHT)
Repeat
Until WaitWindowEvent() = #PB_Event_CloseWindow
EndIf
Zenrtiert und rechtsbündig ohne #PB_ComboBox_Editable habe ich gerade keine Beispielcode. Da müsste ich erst auf MSDN schauen, wenn ich Zeit habe, aber wann weiß ich nicht.