Hello Martin.
I do not see "onmouseevent", "onkeydown" and "onkeyup" in the properties of
TSlider in the mse designer.
I would need it for something (or maybe you have a other way to do that task).
Here the thing:
A external thread does change the position of a trackbar in each of his loop.
But I want that, when changing the position of the trackbar manualy (with mouse
or keyboard), the external thread does not touch at the position of the slider.
Usually I do this with other widgetsets:
procedure ASlider.onmousedown(sender: TObject); // idem for onkeydown
begin
ASlider.tag := 1;
end;
procedure ASlider.onmouseup(sender: TObject); // idem for onkeyup
begin
ASlider.tag := 0;
end;
and in the loop of the thread:
...
if ASlider.tag = 0 then ASlider.position := somewhere;
Huh, I permise myself to change very few things in msegraphedits.pas
tslider = class(tcustomslider)
published
property value;
property scrollbar;
property onsetvalue;
property onkeydown; // this added
property onkeyup; // this added
property onmouseevent; // this added
property direction;
property onpaintglyph;
end;
Now, those properties are accessible with mse designer and I can do perfectly
what I needed.
procedure tmainfo.onSliderMouseEvent(const sender: twidget;
var ainfo: mouseeventinfoty);
begin
if ainfo.eventkind = ek_buttonpress then ASlider.tag := 1 else
if ainfo.eventkind = ek_buttonrelease then ASlider.tag := 0 ;
end;
Maybe you may publish onmouseevent/onkeydown/onkeyup too (or maybe you are a
good reason not to do it).
Other thing...
When manually changing the position of the slider, how to get the position of
the slider before to release the mouse-button ?
I did try with Tslider.onchange but the position does not change until the
button is released.
Thanks.
Fre;D
<http://sites.google.com/site/fiensprototyping/home>
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
mseide-msegui-talk mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mseide-msegui-talk