SetGadgetItemState doesn't highlight after a SendMessage_ to the object for some reason...
Code: Select all
Procedure FindFirst(Parameter)
If CountGadgetItems(#ListBox) = 0
StatusBarText(#MyStatusBar, 0, "There is no data loaded or in the list to work on!", 0)
ProcedureReturn
EndIf
founddata = 0
other()\finditem = LCase(GetGadgetText(#FindItem))
If other()\finditem ""
ResetList(content())
While NextElement(content()) And founddata 1
compare.s = LCase(content()\filename + content()\filetype + content()\category + content()\collection + content()\display + content()\trademark + content()\tradelink)
If FindString(compare.s, other()\finditem, 1) 0
founddata = 1
itemnumber = ListIndex(content())
SendMessage_(GadgetID(#ListBox), #LVM_ENSUREVISIBLE, itemnumber - 1, 0)
SetGadgetItemState(#ListBox, itemnumber - 1, 1)
other()\liststate = itemnumber - 1
EndIf
Wend
Else
StatusBarText(#MyStatusBar, 0, "Nothing to find, You actually have To put something in the search box To find anything?", 0)
EndIf
EndProcedure
I have tried ActivateGadget but it made no difference. #ListBox is the ListIconGadget
Fangles
