CreateComboBox height?

BlitzPlus Forums/BlitzPlus Programming/CreateComboBox height?

Kcarlino(Posted 2003) [#1]
I'm trying to set the expanded (dropped down state) size of a combobox. It appears the height parameter of CreateComboBox has no effect.

Does anyone know how to set the expanded size of the combobox?

Thanks


Zenith(Posted 2003) [#2]
That is automatically set by Windows itself.


skidracer(Posted 2003) [#3]
I'd call it a bug.


Mark Tiffany(Posted 2003) [#4]
You can adjust both the height and width of the drop-down part of the combobox through the Windows API (Can't remember names off the top of my head I'm afraid). If this were to be supported through a Blitz command, I'd suggest that we should allow both the height and width to be set...


Kcarlino(Posted 2003) [#5]
Thanks for the feedback. I tried the Windows API MoveWindow() which as I understand should allow for setting the drop-down height, unfortunately it had no effect on the drop down height.

Ken


EOF(Posted 2003) [#6]
There is a 'CB_SETMINVISIBLE' constant but I do not know its value. It's used with the SendMessage API call.

See more info here on Micro$ofts MSDN Library

I think this works with XP only as well.
Al I have managed to get working is the items font height size:

; Combobox


; userlibs
; *******************************************************
; .lib "user32.dll"
; SendMessage%(hwnd, msg, wParam, mParam):"SendMessageA"
; *******************************************************

Const CB_SETITEMHEIGHT=$153
Const CB_SETMINVISIBLE=0 ; I don't know this value ???

win=CreateWindow("test",50,20,200,100,Desktop(),1+2)
cb=CreateComboBox(10,10,100,0,win)

For i=0 To 20
   AddGadgetItem cb,"Item "+i
Next
SelectGadgetItem cb,0

SendMessage QueryObject(cb,1),CB_SETITEMHEIGHT,0,30
;; SendMessage QueryObject(cb,1),CB_SETMINVISIBLE,0,10

Repeat
	Until WaitEvent()=$803
End