Thema: Delphi Nochmal onMouseMove ???

Einzelnen Beitrag anzeigen

schniede

Registriert seit: 20. Sep 2003
Ort: Woltersdorf
104 Beiträge
 
Delphi 7 Professional
 
#1

Nochmal onMouseMove ???

  Alt 21. Okt 2003, 21:57
Hab jetzt ein anderes problem wenn ich die Maus zu schnell
bewege ändert sich die farbe garnicht .
mit (aRect.Left -1) kann ich die empfindlichkeit steuern nur um so größer -1,-2,-3 u.s.w
umso wahrscheinlicher das mehr buttons gleichzeitig leuchten

(habe 5 Kleine Buttons mit high :=20 u. width:=130 dicht zusammen)


Code:
procedure TForm1.GroupBox1MouseMove(Sender: TObject; Shift: TShiftState; X,
  Y: Integer);
VAR
   aRect ,brect ,crect,drect,erect   : TRect;
BEGIN
   aRect :=bestell_btn.BoundsRect;                

   IF (x >= (aRect.Left -1)) AND
      (x <= (aRect.Right +1)) AND
      (y >= (aRect.Top -1)) AND
      (y <= (aRect.Bottom +1)) THEN

      bestell_btn.Font.color := clnavy
      ELSE
   bestell_btn.Font.color :=clblack ;

       bRect :=verkaufen_btn.BoundsRect;              
   IF (x >= (bRect.Left -1)) AND
      (x <= (bRect.Right +1)) AND
      (y >= (bRect.Top -1)) AND
      (y <= (bRect.Bottom +1)) THEN

     verkaufen_btn.Font.color := clnavy
      ELSE
   verkaufen_btn.Font.color :=clblack ;

       cRect :=termin_btn.BoundsRect;            
   IF (x >= (cRect.Left -1)) AND
      (x <= (cRect.Right +1)) AND
      (y >= (cRect.Top -1)) AND
      (y <= (cRect.Bottom +1)) THEN

     termin_btn.Font.color := clnavy
      ELSE
    termin_btn.Font.color :=clblack ;

       dRect :=notizbtn.BoundsRect;                
   IF (x >= (dRect.Left -1)) AND
      (x <= (dRect.Right +1)) AND
      (y >= (dRect.Top -1)) AND
      (y <= (dRect.Bottom +1)) THEN

     notizbtn.Font.color := clnavy
      ELSE
     notizbtn.Font.color :=clblack ;

       eRect :=bitbtn7.BoundsRect;                
   IF (x >= (eRect.Left -1)) AND
      (x <= (eRect.Right +1)) AND
      (y >= (eRect.Top -1)) AND
      (y <= (eRect.Bottom +1)) THEN

    bitbtn7.Font.color := clnavy
      ELSE
     bitbtn7.Font.color :=clblack ;

end;

vieleicht hat ja jemand ne bessere bzw. taugliche Idee.

mfg schniede
  Mit Zitat antworten Zitat