Forum Discussion
Bjoernw
8 years agoNew Contributor
Hello,
me again ;)
how would the code Shankar_R posted would look like in DelphiScript?
thanks again
- m_essaid8 years agoValued Contributor
here it is, tested, :)
you'll have obviously to map your combobox and use its alias name
the "break" is to stop searching at the first occurence (if there is multiple occurences of the same item in the list)
- tristaanogre8 years agoEsteemed Contributor
Forgive me, it's been YEARS since I've had to write DelphiScript... so... here's my best guess:
function fn_selectlistvalue(objListbox,str_valetoSelect) var vitemcount; var result; begin result := false; vitemcount := objListbox.wItemCount; for lsti:= 0 to vitemcount-1 do begin if (aqString.Compare(aqConvert.VarToStr(objListBox.wItem(lsti)), str_valuetoselect, false) = 0 then begin objListbox.ClickItem(lsti); result := true; end; end; fn_selectlistvalue := result; end;
Related Content
- 7 years ago
- 8 years ago
- 14 years ago
- 15 years ago
Recent Discussions
- 7 hours ago