Recent

Author Topic: Differentiate input source for TTrackbar  (Read 2993 times)

wimpie

  • New Member
  • *
  • Posts: 32
Differentiate input source for TTrackbar
« on: November 25, 2010, 09:49:20 am »
Hi

How do one know whether a trackbar's Position property was changed from code (trackbar.position := xx) or from the GUI (using mouse or keyboard). I need to take different actions depending on this

typo

  • Hero Member
  • *****
  • Posts: 3051
Re: Differentiate input source for TTrackbar
« Reply #1 on: November 25, 2010, 11:47:42 am »
I think you need to use a boolean variable to avoid executing your event handler when position is changed by code.
« Last Edit: November 25, 2010, 12:48:59 pm by typo »

wimpie

  • New Member
  • *
  • Posts: 32
Re: Differentiate input source for TTrackbar
« Reply #2 on: November 25, 2010, 12:03:24 pm »
Thanks for the reply. I ended up disconnecting the event handler for the cases where the position is set by code.

 

TinyPortal © 2005-2018