Jump to content

Recommended Posts

I am still having a hard time with a Listbox and distinguishing between "touch" to select and item in a listbox on a desktop/laptop browser.....and "touch" to begin scrolling (e.g. on a phone/tablet)


Using a basic example listbox with 100 items


procedure TForm1.Resize;
var i: integer;
  for i:= 1 to 100 do
   W3ListBox1.Add('Item ' + inttostr(i));

When a user is using the desktop/laptop browser, I need them to be able to use both mouse and touch (case their monitor is touch) to "scroll" and "select" item.....else if using their phone or tablet, need them to be able to use "touch" to scroll and "tap" to select item



I assume we dont want to use the standard OnSelected event ?


 W3ListBox1..OnSelected := HandleLBItemSelected;


and probably want to use the OnTouchBegin & OnTouchEnd, as well as the OnMouseDown & OnMouseUp  events??????  


If So, how?


And how do you then handle the scrolling?
Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...