Autor Beitrag
rokdd
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 329

Win XP
D6
BeitragVerfasst: So 15.02.04 15:50 
hallo,
habe so meine problem mit komponenten. und nach dem die probleme gelöst wurden sehe ich ncoh weniger durch :( .
also hier noch so ein tolles problem:
ich habe eine komponte und möchte deren left und top wert nicht auf die form, sondern auf den bildschirm beziehen. diese ewigen additionswege sind mir nämlich zu umständlich und fehleranfällig. hoffe, dass da etwas einfaches gibt...


rokdd


Zuletzt bearbeitet von rokdd am Fr 20.02.04 19:32, insgesamt 1-mal bearbeitet
catweasel
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 487
Erhaltene Danke: 1

Win 7 64bit
Delphi 7 Second Sedition V7.2
BeitragVerfasst: So 15.02.04 16:52 
Hmmm...

ich glaube ausser addieren ..:

ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
test : TComponent;
xpos,ypos : integer;

xpos := test.parent.left+test.left;
ypos := test.parent.top+test.top;


fällt mir auch nix ein...
Wenn die Komponente nicht direkt auf der Form ist (z.b. einem Panel) müsste es dann heissen: test.parent.parent.left etc....
Es sei den Das Panel ist auch nicht auf der Form direkt.. ;-)

Catweasel

_________________
Pommes werden schneller fertig wenn man sie vor dem Frittieren einige Minuten in siedendes Fett legt.
rokdd Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 329

Win XP
D6
BeitragVerfasst: So 15.02.04 17:21 
ja das ist aber noch ein frame dazwischen....
und wenn ich dann massenhaft addiere ist dann ist bissel blöd und sieht (klingt blöd) etwas ungenau aus. ich glaube die titeleiste der form spielt da mit rein weil abgestellt.


rokdd
catweasel
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 487
Erhaltene Danke: 1

Win 7 64bit
Delphi 7 Second Sedition V7.2
BeitragVerfasst: So 15.02.04 20:56 
Lass das addieren jeweils die komponente machen..

Einfach ne Methode einfügen die sich parent für parent nach oben durchfragt und die positionen addiert.....
...

Catweasel

_________________
Pommes werden schneller fertig wenn man sie vor dem Frittieren einige Minuten in siedendes Fett legt.
teebee
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 109


D6 Prof
BeitragVerfasst: Mo 16.02.04 08:24 
Schau Dir mal 'ClientToScreen' an...

Gruß, teebee