setMaxDropDownRows

Discussions related to Visual Prolog
User avatar
Ferenc Nagy
VIP Member
Posts: 289
Joined: 24 Apr 2007 12:26

setMaxDropDownRows

Unread post by Ferenc Nagy » 1 Mar 2015 12:29

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?
TIA, Regards,
Frank Nagy

User avatar
Jan de Lint
VIP Member
Posts: 107
Joined: 6 Mar 2000 0:01

Unread post by Jan de Lint » 2 Mar 2015 11:54

I think you should treat the drop down box as a if it were a list box regarding the height.
]an

Post Reply