No announcement yet.

SelectListBox equivalent in DDT?

  • Filter
  • Time
  • Show
Clear All
new posts

  • SelectListBox equivalent in DDT?

    In a PBDK program I wrote, I used SelectListBox to
    select a string and scroll it into view:

    SelectListBox hListBox,index

    Is there an analog to this in PBDLL6.0's DDT?

  • #2
    take a look at dave navarro's listbox encapsulation routines at

    they are very good to use and also includes this one for %lb_selectstring,
    which i guess is what you are looking for.

    <font face="courier new, courier" size="3"><pre>
    ' title: lbselectstring
    ' desc: select an item in a listbox by its text (or partial text).
    ' syntax: retval = lbselectstring(hlistbox, startposition, text$)
    'remarks: the return value is the index of the selected item if the search was
    ' successful. the return value is %lb_err if the search was
    ' unsuccessful and the current selection is not changed.
    function lbselectstring(byval hlistbox as long, byval start as long, _
    byval text as string) as long
    function = sendmessage(hlistbox, %lb_selectstring, start, strptr(text))
    end function