Autor Beitrag
Flash106
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 234


D7 Ent
BeitragVerfasst: Mi 24.08.05 13:52 
Hallo,

ich mach mir grad ne eigen StringGrid Compo und will erreichen, dass wenn ich sie zur entwicklerzeit aufs form setze und das grid dann resize das sich dann die cells in der größe mit verändern.. wie mach ich das?!?!
cutelaw
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 27

Win XP Prof
D5 Prof, D7 Prof, D9 Prof
BeitragVerfasst: Fr 26.08.05 08:39 
na, noch keine antwort?

du kannst wie im TCustomGrid oder TWinControl auf die WM_Size message reagieren oder Resize von TControl überschreiben.
ausblenden Delphi-Quelltext
1:
2:
3:
4:
// TCustomGrid oder TWinControl
procedure WMSize(var Msg: TWMSize); message WM_SIZE;
// TControl
procedure Resize; dynamic;

und dann je nach clientgröße des grids und der breite der captions die spaltenbreiten neu berechnen. das sollte so eigentlich dann auch zur laufzeit funzen...

Grüßchen!
Flash106 Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 234


D7 Ent
BeitragVerfasst: Do 01.09.05 14:29 
das klingt gut und einleuchtend. ich teste es mal. danke!.. schreib dann nochmal obs funktioniert hat.. =)
Flash106 Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 234


D7 Ent
BeitragVerfasst: Do 01.09.05 14:52 
funktioniert ohne probleme. DANKE! :D