Recent

Author Topic: TPanel + OnMouseUp  (Read 3954 times)

horizon

  • Newbie
  • Posts: 1
TPanel + OnMouseUp
« on: March 22, 2005, 07:44:33 pm »
Hello,

i try to use the TPanel Component and the Event OnMouseUp.
But the IDE shows the error:

wrong number or parameters specified


but i think the parameters are correct...

procedure   HandleOnMouseUp(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer);

can you help me?  :?:

eric

  • Sr. Member
  • ****
  • Posts: 268
TPanel + OnMouseUp
« Reply #1 on: March 24, 2005, 11:11:38 am »
If you mean that you're trying to assign the event handler in your code, then you either need to do it like this:

Panel1.OnMouseUp := @HandleOnMouseUp;

or you need to use the compiler switch to go to Delphi mode.

Eric

matthijs

  • Hero Member
  • *****
  • Posts: 537
TPanel + OnMouseUp
« Reply #2 on: March 24, 2005, 04:26:00 pm »
You cannot just use any procedure as a event handler. You have to make HandleOnMouseUp a method of a object.
What's in a sig? Would my posting look less if it didnot have a sig? (Free after William S.) :)

:( Why cannot I upload my own Avatar? :(

 

TinyPortal © 2005-2018