Autor Beitrag
D. Annies
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 1843

windows 7
D6 Enterprise, D7 Pers und TD 2006
BeitragVerfasst: Sa 29.01.11 14:17 
Hi, Delpher,

ich will einer Prozedur als Übergabeparameter ein Stringgrid, und (meistens) eine Groupbox übergeben - aber auch ein
Formular.
Welchen Übergabeparameter muss ich dafür verwenden?

ausblenden Delphi-Quelltext
1:
2:
procedure Gridbreite(SG:TStringgrid; GB:TGroupbox); 
//                                    das geht ja leider nicht


Danke für Hilfestellung,
Detlef

_________________
ut vires desint, tamen est laudanda voluntas
bummi
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 1248
Erhaltene Danke: 187

XP - Server 2008R2
D2 - Delphi XE
BeitragVerfasst: Sa 29.01.11 14:21 
ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
procedure Gridbreite(SG:TStringgrid; C:TComponent);
begin
  if Assigned(C) then
    begin
      If C is TForm then TForm(C)...
            else If C is TGroubbox then TGroupBox(C)...  
          end;  
end;

_________________
Das Problem liegt üblicherweise zwischen den Ohren H₂♂
DRY DRY KISS

Für diesen Beitrag haben gedankt: D. Annies
D. Annies Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 1843

windows 7
D6 Enterprise, D7 Pers und TD 2006
BeitragVerfasst: Sa 29.01.11 14:35 
Hi, Bummi,

danke für deine Lösung. Ich habe sogar eben selbst eine (noch) einfachere gefunden, da ich nur die Breite brauche, also
kann ich auch die Objektbreite als integer übergeben :)

Gruß, Detlef

_________________
ut vires desint, tamen est laudanda voluntas