Autor Beitrag
dinu_ch
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 42



BeitragVerfasst: Do 20.10.05 21:53 
Ich bin am Umziehen von Formularen auf Frames ( C&P...), was gibt es in Forms um z.B. Labels zu aktualisieren wenn das Frame neu angezeigt oder erneut aufgerufen wird ? Ich arbeite beim Wechseln der Frames mit visible:=true/false. Gibt es da auch eine Alternative wie Form.Close/Show ?
BattleFrog
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 53

WIN 2000
Delphi 7 Ent.
BeitragVerfasst: Fr 21.10.05 08:33 
Frames verhalten sich eigentlich wie normale Komponenten auf einer Form, so wie eine Scrollbox oder ein Panel.
Daher gibt es da auch keine besonderen Ereignisse oder Methoden zusätzlich.
digi_c
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 1905

W98, XP
D7 PE, Lazarus, WinAVR
BeitragVerfasst: Fr 21.10.05 09:21 
Also muss man da von außen rangehen sprich wenn man sie aufbaut?
Das wäre doch aber nur möglich wenn man die nicht per DnD reinzieht oder?
BattleFrog
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 53

WIN 2000
Delphi 7 Ent.
BeitragVerfasst: Fr 21.10.05 10:20 
user profile icondigi_c hat folgendes geschrieben:
Also muss man da von außen rangehen sprich wenn man sie aufbaut?
Das wäre doch aber nur möglich wenn man die nicht per DnD reinzieht oder?


Sry, die Fragen versteh' ich nicht ein Stück.
Redest du von der Entwurfszeit oder Laufzeit?

Auf Drag and Drop Ereignisse kann jede normale Komponente reagieren, falls das weiterhilft.
digi_c
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 1905

W98, XP
D7 PE, Lazarus, WinAVR
BeitragVerfasst: Fr 21.10.05 11:54 
Sorry mein Fehler ich meinte natürlich die variante zur Entwurfszeit ;)
buster
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 66
Erhaltene Danke: 7

WIN 7
Delphi 2010 Prof
BeitragVerfasst: Mi 02.11.05 11:10 
Hallo,

ich hab so ziemlich das gleiche Problem, Frames mit statischem Inhalt und z.B. Radiobuttons. Das einzige Ereignis, das mir einfällt, wäre OnEnter, da muss ich aber erst auf den Frame klicken, um z.B. den RadioButtons einen Wert zuzuweisen (ist nicht so toll :( ). Habt ihr hier schon eine Lösung gefunden oder versinkt der Thread einfach nur so in der Unendlichkeit?

Grüssle,
der Buster

_________________
die groessten Kritiker der Elche waren frueher selber welche... ;)
noidic
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 851

Win 2000 Win XP Vista
D7 Ent, SharpDevelop 2.2
BeitragVerfasst: Mi 02.11.05 11:23 
Die einzige Möglichkeit, die mir dazu einfällt, wäre eine Methode auf dem Frame, die dann bei der Aktion, die den Frame sichtbar schaltet, aufgerufen wird.

Ein konkretes Event dafür gibt es afaik nicht.

_________________
Bravery calls my name in the sound of the wind in the night...
Amiga-Fan
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 534



BeitragVerfasst: Mi 02.11.05 12:43 
ich hatte mal ein Stringgrid draufgepackt, und dann in das Onvisible-Ereignis das Stringgrid unsichtbar gemacht und divere Aufrufe gemacht. Ich weiß jetzt nicht mehr genau, ob es Onvisible war, musst du mal ausprobieren.

_________________
- Leg dich nie mit einem Berufsprogrammierer an
- Wahre Profis akzeptieren keine einfachen Lösungen
AndyB
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 1173
Erhaltene Danke: 14


RAD Studio XE2
BeitragVerfasst: Mi 02.11.05 13:49 
user profile iconAmiga-Fan hat folgendes geschrieben:
Ich weiß jetzt nicht mehr genau, ob es Onvisible war, musst du mal ausprobieren.

OnVisible? Von so einem Ereignis habe ich noch nie gehört. OnShow und OnHide heißen die wenn überhaupt. Und ein StringGrid hat die nicht. StringGirds bieten ein OnHideEditor, aber das ist was ganz anderes.

Da Frames auch nur von TFrame abgeleitete Klassen sind, hindert niemand dich Methoden zu überschreiben.
  • OnCreate => constructor Create überschreiben
  • OnDestroy => destructor Destroy überschreiben
  • OnShow => procedure CMVisibleChanged; message CM_VISIBLECHANGED und dort Visible=True abfragen
  • OnHide => procedure CMVisibleChanged; message CM_VISIBLECHANGED und dort Visible=False abfragen

_________________
Ist Zeit wirklich Geld?
Amiga-Fan
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 534



BeitragVerfasst: Mi 02.11.05 19:18 
OnDrawCell war es glaube ich

_________________
- Leg dich nie mit einem Berufsprogrammierer an
- Wahre Profis akzeptieren keine einfachen Lösungen
buster
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 66
Erhaltene Danke: 7

WIN 7
Delphi 2010 Prof
BeitragVerfasst: Fr 04.11.05 15:30 
Mit dem OnShow-Event funktionierts bestens :D

Danke!