AGB  ·  Datenschutz  ·  Impressum  







Anmelden
Nützliche Links
Registrieren
Thema durchsuchen
Ansicht
Themen-Optionen

Eigene Komponente - Focus

Ein Thema von Neutral General · begonnen am 1. Jan 2008 · letzter Beitrag vom 2. Jan 2008
Antwort Antwort
Benutzerbild von Neutral General
Neutral General

Registriert seit: 16. Jan 2004
Ort: Bendorf
5.219 Beiträge
 
Delphi 10.2 Tokyo Professional
 
#1

Eigene Komponente - Focus

  Alt 1. Jan 2008, 15:21
Hi,

Hab ne Komponente von TCustomControl abgeleitet. Jetzt würde ich gerne mitbekommen wenn man außerhalb der Komponente geklickt hat. Hab leider grad keine Ahnung weil WM_KILLFOCUS nicht funktioniert.
Was kann ich denn da machen?

Gruß
Neutral General
Michael
"Programmers talk about software development on weekends, vacations, and over meals not because they lack imagination,
but because their imagination reveals worlds that others cannot see."
  Mit Zitat antworten Zitat
1234588

Registriert seit: 14. Jan 2007
Ort: Stuttgart
164 Beiträge
 
#2

Re: Eigene Komponente - Focus

  Alt 1. Jan 2008, 15:32
WM_KILLFOCUS wird gesendet, wenn der caret (der text cursor) das control gewechselt hat. was dir helfen wird ist die WM_ACTIVATE message
  Mit Zitat antworten Zitat
Benutzerbild von Neutral General
Neutral General

Registriert seit: 16. Jan 2004
Ort: Bendorf
5.219 Beiträge
 
Delphi 10.2 Tokyo Professional
 
#3

Re: Eigene Komponente - Focus

  Alt 1. Jan 2008, 15:38
Hi,

Habs jetzt so gemacht, funktioniert aber nicht...

Delphi-Quellcode:
// Verkürzt
TMeineComponente = class
protected
  procedure Activate(var Msg: TMessage); message WM_ACTIVATE;
end;

procedure TMeineComponente.Activate(var Msg: TMessage);
begin
  inherited;
  if Msg.WParamLo = WA_INACTIVE then
    Focused := -1;
end;
Michael
"Programmers talk about software development on weekends, vacations, and over meals not because they lack imagination,
but because their imagination reveals worlds that others cannot see."
  Mit Zitat antworten Zitat
Benutzerbild von Neutral General
Neutral General

Registriert seit: 16. Jan 2004
Ort: Bendorf
5.219 Beiträge
 
Delphi 10.2 Tokyo Professional
 
#4

Re: Eigene Komponente - Focus

  Alt 2. Jan 2008, 14:45
Hat jemand vielleicht noch ne Idee ? Wäre ganz nett...
Michael
"Programmers talk about software development on weekends, vacations, and over meals not because they lack imagination,
but because their imagination reveals worlds that others cannot see."
  Mit Zitat antworten Zitat
Antwort Antwort


Forumregeln

Es ist dir nicht erlaubt, neue Themen zu verfassen.
Es ist dir nicht erlaubt, auf Beiträge zu antworten.
Es ist dir nicht erlaubt, Anhänge hochzuladen.
Es ist dir nicht erlaubt, deine Beiträge zu bearbeiten.

BB-Code ist an.
Smileys sind an.
[IMG] Code ist an.
HTML-Code ist aus.
Trackbacks are an
Pingbacks are an
Refbacks are aus

Gehe zu:

Impressum · AGB · Datenschutz · Nach oben
Alle Zeitangaben in WEZ +1. Es ist jetzt 08:23 Uhr.
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024 by Thomas Breitkreuz