Solved

delphi trackbar with mouse events

Posted on 2009-04-03
2
2,654 Views
Last Modified: 2012-05-06
Hi experts,

  I am using delphi-7(pascal), I want trackbar with mouse up event. Please tell me how to get mouse up event for delphi normal trackbar. or please suggest me any free components for trackbar with mouse events.

0
Comment
Question by:inampudi1
  • 2
2 Comments
 
LVL 26

Accepted Solution

by:
EddieShipman earned 500 total points
Comment Utility
Try this on for size:

unit Unit1;
 

interface
 

uses

  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,

  Dialogs, ComCtrls;
 

type

  TTrackBar = class(ComCtrls.TTrackbar)

  protected

    property OnMouseUp;

  end;
 

  TForm1 = class(TForm)

    TrackBar1: TTrackBar;

    procedure TBMouseUp(Sender: TObject; Button: TMouseButton;

      Shift: TShiftState; X, Y: Integer);

    procedure FormCreate(Sender: TObject);

  private

    { Private declarations }

  public

    { Public declarations }

  end;
 

var

  Form1: TForm1;
 

implementation
 

{$R *.dfm}
 

procedure TForm1.TBMouseUp(Sender: TObject; Button: TMouseButton;

  Shift: TShiftState; X, Y: Integer);

begin

  ShowMessage(IntToStr(x) + ':' + IntToStr(y));

end;
 

procedure TForm1.FormCreate(Sender: TObject);

begin

  TrackBar1.OnMouseUp := TBMouseUp;

end;
 

end.

Open in new window

0
 
LVL 26

Expert Comment

by:EddieShipman
Comment Utility
inampudi1, Have you had time to try the code?

It simply publishes the OnMouseUp for the trackbar control.
0

Featured Post

How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

Join & Write a Comment

Suggested Solutions

This article explains how to create forms/units independent of other forms/units object names in a delphi project. Have you ever created a form for user input in a Delphi project and then had the need to have that same form in a other Delphi proj…
In my programming career I have only very rarely run into situations where operator overloading would be of any use in my work.  Normally those situations involved math with either overly large numbers (hundreds of thousands of digits or accuracy re…
It is a freely distributed piece of software for such tasks as photo retouching, image composition and image authoring. It works on many operating systems, in many languages.
This video shows how to remove a single email address from the Outlook 2010 Auto Suggestion memory. NOTE: For Outlook 2016 and 2013 perform the exact same steps. Open a new email: Click the New email button in Outlook. Start typing the address: …

763 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

12 Experts available now in Live!

Get 1:1 Help Now