Autor Beitrag
CyberStorm
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 33

WIN 98, WIN XP
D4 Prof, D6 Pers
BeitragVerfasst: So 05.01.03 12:24 
Hi,

Hab Ich die Möglichkeit, die einzelnen Buttons auf dem DBNavigator abzufragen. Ob z.B. der Datensatz hinzufügen Button gedrückt wurde?

mfg
CyberStorm
Tino
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Veteran
Beiträge: 9839
Erhaltene Danke: 45

Windows 8.1
Delphi XE4
BeitragVerfasst: So 05.01.03 13:07 
Hi,

schon mal in die Ereignisse des tDbNavigators geschaut? Dort findest Du das OnClick Event. Hier ein Beispiel aus der Delphi-Hilfe:
ausblenden Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
procedure TForm1.DBNavigator1Click(Sender: TObject; Button: TNavigateBtn);

var
  BtnName: string;
begin
  case Button of
    nbFirst  : BtnName := 'nbFirst';
    nbPrior  : BtnName := 'nbPrior';
    nbNext   : BtnName := 'nbNext';
    nbLast   : BtnName := 'nbLast';
    nbInsert : BtnName := 'nbInsert';
    nbDelete : BtnName := 'nbDelete';
    nbEdit   : BtnName := 'nbEdit';
    nbPost   : BtnName := 'nbPost';
    nbCancel : BtnName := 'nbCancel';
    nbRefresh: BtnName := 'nbRefresh';
  end;
  MessageDlg(BtnName + ' wurde angeklickt.', mtInformation, [mbOK], 0);

end;


Gruß
TINO
CyberStorm Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 33

WIN 98, WIN XP
D4 Prof, D6 Pers
BeitragVerfasst: So 05.01.03 13:43 
Danke :)

mfg
CyberStorm