Page 1 of 1

setMaxDropDownRows

Posted: 1 Mar 2015 12:29
by Ferenc Nagy
Listbox issues an error message:

Code: Select all

setMaxDropDownRows(_) :-         exception::raise_unsupportedPredicate().
ListControlSupport works:

Code: Select all

clauses     setMaxDropDownRows(Rows) :-         maxDropDownRows_fact := Rows,         whenCreated(             {  :-                 _ = sendMessage(gui_native::cb_setminvisible, gui_api::mkW(maxDropDownRows_fact)),                 rct(L, T, R, B) = getClientRect(),                 Height = getMaxDropDownRows() * gui_api::getInteger(sendMessage(gui_native::cb_getitemheight)),                 Border = 2 * systemInformation_native::getSystemMetrics(systemInformation_native::sm_cyborder),                 setClientRect(rct(L, T, R, B + Height + Border))             }).
My program calls the erroneous version.
Where should I put the setting of maximal dropped down lines?
A)In the property sheet generating automatically

Code: Select all

pole_lb:setMaxDropDownRows(2)
commands?
B) In the onShow event handling?
C) Let me forget dropdown and and set rather the height of the list box?

Posted: 2 Mar 2015 11:54
by Jan de Lint
I think you should treat the drop down box as a if it were a list box regarding the height.
]an