Autor Beitrag
mexx
ontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic starofftopic star
Beiträge: 1183



BeitragVerfasst: Do 17.11.05 17:08 
Ich möchte das Panel beim überfahren der Mouse Raised und beim Verlassen den Mauszeigers wieder Lowered. Aber es will mir einfach nicht gelingen. Helft mir bitte!
noidic
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 851

Win 2000 Win XP Vista
D7 Ent, SharpDevelop 2.2
BeitragVerfasst: Do 17.11.05 17:09 
Glaskugeln haben heute Urlaub, könntest du den Code posten und sagen, was genau da nicht geht?

_________________
Bravery calls my name in the sound of the wind in the night...
mexx Threadstarter
ontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic starofftopic star
Beiträge: 1183



BeitragVerfasst: Do 17.11.05 17:15 
Ich habe vier Panel, jedes dieser Panel ist Lowered. Sobald ich mit der Mouse über das Panel fahre wird es Raised indem ich

Panel1.BevelOuter := bvRaised;

mache. Ich möchte aber, dass wenn ich das Panel wieder verlasse, sich das Lowered wieder einstellt.

Wie geht das?

THX, für die schnelle Reaktion!
BattleFrog
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 53

WIN 2000
Delphi 7 Ent.
BeitragVerfasst: Do 17.11.05 17:18 
Dafür musst du das Label ein bisschen erwitern, denn die benötigten Ereignisse kennt es noch nicht bzw reagiert net drauf.

Gucks du hier
www.delphi-forum.de/viewtopic.php?t=20035

und hier ein Beispiel für ein TImage
www.swissdelphicente...showcode.php?id=1068


Zuletzt bearbeitet von BattleFrog am Do 17.11.05 17:21, insgesamt 1-mal bearbeitet
mexx Threadstarter
ontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic starofftopic star
Beiträge: 1183



BeitragVerfasst: Do 17.11.05 17:20 
Ich besitze weder MouseOver noch Rollover.
DarkHunter
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 477

Win XP
D3 Prof, D2005 PE
BeitragVerfasst: Do 17.11.05 17:20 
Du kannst die aktuelle Cursorposition abfragen, in die Mousemove musst du nur eine Abfrage setzen ob das im Feld ist oder nicht.
Dabei musst du aber beachten, dass dir Die Cursorposition absolut angegeben werden, dh im Bezug zum Desktop, nicht zum Formular.

_________________
I believe that every human has a finite number of heart-beats. I don't intend to waste any of mine running around doing exercises.
- Neil Armstrong
mexx Threadstarter
ontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic starofftopic star
Beiträge: 1183



BeitragVerfasst: Do 17.11.05 17:21 
Puhh, geht das nicht einfacher?
noidic
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 851

Win 2000 Win XP Vista
D7 Ent, SharpDevelop 2.2
BeitragVerfasst: Do 17.11.05 17:22 
Wie erreichst du denn bisher, dass das panel geraised wird?

_________________
Bravery calls my name in the sound of the wind in the night...
DarkHunter
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 477

Win XP
D3 Prof, D2005 PE
BeitragVerfasst: Do 17.11.05 17:26 
user profile iconmexx hat folgendes geschrieben:
Puhh, geht das nicht einfacher?

ich wüsste nicht wie.

Aber hier wäre der Code für ein Panelmousemove
ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
var cursorx,cursory:integer;
begin
cursorx := Mouse.cursor.X-form.left;
curosry := Mouse.cursor.Y-form.top;
if (((cursorx > panel.left) and (cursorx < panel.left+panel.width)) 
and ((cursory > panel.top) and (cursory < panel.top+panel.height))) then
  panel.bevelouter := bvraised else panel.bevelouter := bvlowered;
end;

_________________
I believe that every human has a finite number of heart-beats. I don't intend to waste any of mine running around doing exercises.
- Neil Armstrong