Autor Beitrag
lkz633
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 136

WinXP, Suse Linux 8.2 (unter VMWare)
D7 Prof, K3 Prof
BeitragVerfasst: So 09.02.03 18:39 
Hallo,

ich muss bei einem Panel die Höhe dynamisch veraendern, danach zeige ich es an mit visible=true;.

Wie kann ich jetzt abfragen, ob das Panel über den Fensterrand hinausgeht, wieviel es hinausgeht und es dementsprechend nach oben/zur seite verschieben ?

Herlichen Dank und Gruss
lkz633
tommie-lie
ontopic starontopic starontopic starontopic starontopic starofftopic starofftopic starofftopic star
Beiträge: 4373

Ubuntu 7.10 "Gutsy Gibbon"

BeitragVerfasst: So 09.02.03 19:37 
dafür gibt's doe top, left, height und width Properties.
Wenn du zum Beispiel top und height addierst, hast du die Position der unteren Kante. Ragt die über dein Form hinaus (von der hast du ja auch die Height), dann schiebst du's nach oben. Genauso geht's mit allen anderen vier Richtungen auch.

_________________
Your computer is designed to become slower and more unreliable over time, so you have to upgrade. But if you'd like some false hope, I can tell you how to defragment your disk. - Dilbert
matze
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 4613
Erhaltene Danke: 24

XP home, prof
Delphi 2009 Prof,
BeitragVerfasst: So 09.02.03 20:16 
du kannst dir auch mal die eigenschaft align anschaun. die passt die grösse des panels und die position automatisch an

_________________
In the beginning was the word.
And the word was content-type: text/plain.
lkz633 Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 136

WinXP, Suse Linux 8.2 (unter VMWare)
D7 Prof, K3 Prof
BeitragVerfasst: So 09.02.03 20:24 
@tommie-lie

Dies habe ich auch erst versucht, da sich die Werte aber beim Formular auf den Bildschirm, beim Panel wiederum auf das Formular beziehen, ist dies so nicht möglich


@matze

auch dies hilft mir nicht weiter

Trotzdem danke für eure Antworten
lkz633
tommie-lie
ontopic starontopic starontopic starontopic starontopic starofftopic starofftopic starofftopic star
Beiträge: 4373

Ubuntu 7.10 "Gutsy Gibbon"

BeitragVerfasst: Mo 10.02.03 13:49 
zum einen hast du top und left vom Formular auch noch, damit kannst du auch den Rand eines Objektes auf einem Forumlar vom Bildschirmrand bestimmen, außerdem ist doch sowieso nur width und height des Forms wichtig, und das ist nunmal auf's Formular bezogen (worauf denn auch sonst ;-) ). Ich sehe da kein Problem...

_________________
Your computer is designed to become slower and more unreliable over time, so you have to upgrade. But if you'd like some false hope, I can tell you how to defragment your disk. - Dilbert
smiegel
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 992
Erhaltene Danke: 1

WIN 7
D7 Prof., C#, RAD XE Prof.
BeitragVerfasst: Mo 10.02.03 13:54 
Hallo lkz633,

jedes Formular verfügt über die Eigenschaften ClientHeight und ClientWidth. Wenn das Formular nun Besitzer des Label ist, kansst Du mit
ausblenden Quelltext
1:
2:
3:
  ... 
  if ((Label1.Top+Label1.Height)>ClientHeight) then Label1.Top:=ClientHeight-Label1.Height;
  ...


die Position des Labels anpassen.

_________________
Gruß Smiegel
Ich weiß, daß ich nichts weiß, aber ich weiß mehr als die, die nicht wissen, daß sie nichts wissen. (Sokrates)
lkz633 Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 136

WinXP, Suse Linux 8.2 (unter VMWare)
D7 Prof, K3 Prof
BeitragVerfasst: Di 11.02.03 08:50 
smiegel hat folgendes geschrieben:
ClientHeight und ClientWidth


Super, genau das war es. Herzlichen Dank an alle

Gruss lkz633