Solved

No OnMouseUp with TTrackBar?

Posted on 1997-07-30
2
743 Views
Last Modified: 2008-02-26
There doesn't seem to be an event to tell me when the user
finishes sliding the track bar.

Any clues on this one?

Ta chris

(C++Bulider qusetion, hoping Delphi is the same ;-)
0
Comment
Question by:chrishart
2 Comments
 

Accepted Solution

by:
CyberWolf earned 100 total points
ID: 1340220
Hi Chris,

I encountered that problem too. Here is the way I solved it in delphi :

//file: exttrackbar.pas (Extended Trackbar by CyberWolf)
//
// If you use it, please send me your comments, suggestions
// or modifications at CyberWolf_cool@hotmail.com !
//
//
unit ExtTrackBar;

interface

uses
  Windows, Messages, SysUtils, Classes, Graphics, Controls, CommCtrl, ComCtrls;

type
  TExtendedTrackBar = class(TTrackBar)
  private
    { Private declarations }
  protected
    { Protected declarations }
  public
    procedure ClearTics;
  published
    property OnMouseDown;
    property OnMouseMove;
    property OnMouseUp;
  end;

procedure Register;

implementation

procedure TExtendedTrackBar.ClearTics;
begin
SendMessage(Handle,TBM_CLEARTICS,LongInt(True),0);
end;

procedure Register;
begin
  RegisterComponents('CyberWolf', [TExtendedTrackBar]);
end;

end.



As you can see I fixed the bug of the missing ClearTics function too! To use this new trackbar, simply install the new component and then use this one instead of the original TTrackbar!

I hope this will solve your problem,

See ya,

CyberWolf
0
 

Author Comment

by:chrishart
ID: 1340221
That looks great, thanks. It looks a little tricky for a novice like me but I'll give it a go!

I'll let you know how I get on,

many thanks from chris
0

Featured Post

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Introduction The parallel port is a very commonly known port, it was widely used to connect a printer to the PC, if you look at the back of your computer, for those who don't have newer computers, there will be a port with 25 pins and a small print…
Have you ever had your Delphi form/application just hanging while waiting for data to load? This is the article to read if you want to learn some things about adding threads for data loading in the background. First, I'll setup a general applica…
Along with being a a promotional video for my three-day Annielytics Dashboard Seminor, this Micro Tutorial is an intro to Google Analytics API data.
This video shows how to use Hyena, from SystemTools Software, to bulk import 100 user accounts from an external text file. View in 1080p for best video quality.

813 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now