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: Mi 01.11.06 17:42 
Hi, Delpher,

wie kann man im Code die Spaltenbreite einstellen?
Versucht habe ich es mit TbBu.fieldbyname('KLA').size := 100;
und mit DBGrid4.Columns[6].width := 100;

Beides wird klaglos kompiliert, aber bleibt ohne Wirkung!

Wie geht es wirklich?

Danke für Hilfe,
Detlef Annies
jasocul
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 6393
Erhaltene Danke: 147

Windows 7 + Windows 10
Sydney Prof + CE
BeitragVerfasst: Mi 01.11.06 17:52 
Probier mal:
ausblenden Delphi-Quelltext
1:
TbBu.fieldbyname('KLA').DisplayWidth := 100;					

Allerdings wird da die Anzahl der Zeichen verwendet und nicht die Anzahl der Pixel. :wink:
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: Mi 01.11.06 19:19 
Danke, Peter, hervorragend.

Ich bin eben über persistente Felder gegangen, aber so ist es mir lieber!

Gruß, Detlef
jasocul
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 6393
Erhaltene Danke: 147

Windows 7 + Windows 10
Sydney Prof + CE
BeitragVerfasst: Do 02.11.06 08:54 
user profile iconD. Annies hat folgendes geschrieben:
Ich bin eben über persistente Felder gegangen, aber so ist es mir lieber!
Du kennst offensichtlich meine [ironie an]Vorliebe[ironie aus] für persistente Felder. :mrgreen: