Autor Beitrag
Xardas008
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 149

Win 7 Professional x64, Ubuntu 10.04, Windows Server 2008 R2
C#, Visual Studio 2008 Pro, Visual Studio 2010 Ultimate, Eclipse (Java)
BeitragVerfasst: Do 19.07.07 09:03 
Hallo,

ich möchte ein kleines Programm schreiben, wo ich eine Excelähnliche Oberfläche habe, sprich
TStringGrid.
So jetzt mein Problem: Ich habe in Zeile 1 ein Spalte die fixed ist (ist eine Eigenschaft).
Dort soll der Titel der einzelnen Spalte rein, wie füge ich diesen hinzu? Und wie greife ich auf ein einzelnes Element, sprich Spalte1 Zeile 1 das Feld z.B. drauf zu?

Das waren erstmal alle Fragen.


Moderiert von user profile iconKlabautermann: Topic aus Sonstiges (Delphi) verschoben am Do 19.07.2007 um 13:17
oldmax
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 380


D3 Prof, D4 Prof
BeitragVerfasst: Do 19.07.07 09:22 
Hi
Nun, abgesehen von der Hilfe in Delphi (F1) ist der Zugriff auf die Zellen wie du vermutlich schon erahnen kannst mittels

ausblenden Delphi-Quelltext
1:
MyStringgrid.Cells[x,y]:='irgendeinstring';					


bzw.

ausblenden Delphi-Quelltext
1:
MyEdit1.Text:=MyStringgrid.Cells[x,y];					


wobei x und y die Rows und Cols angeben, beginnend bei 0.
Gruß oldmax

_________________
Zier dich nich so, ich krieg dich schon....
Xardas008 Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 149

Win 7 Professional x64, Ubuntu 10.04, Windows Server 2008 R2
C#, Visual Studio 2008 Pro, Visual Studio 2010 Ultimate, Eclipse (Java)
BeitragVerfasst: Do 19.07.07 09:44 
Ok hätt ich eigentlich selbst drauf kommen müssen.

Gut das nächste Problem: Ich habe hinter dem StringGrid ein TabControl, so jetzt soll für jedes Element ein solches StringGrid existieren, und zwar ein eigenständiges, da dies ja eine art Abgrenzung ist (wie bei Excel halt auch). Nur irgendwie bekomme ich das nicht hin.
mkinzler
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 4106
Erhaltene Danke: 13


Delphi 2010 Pro; Delphi.Prism 2011 pro
BeitragVerfasst: Do 19.07.07 09:46 
Hier würde sich der Einfachheit halber ein TPageControl anbieten.

_________________
Markus Kinzler.
Xardas008 Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 149

Win 7 Professional x64, Ubuntu 10.04, Windows Server 2008 R2
C#, Visual Studio 2008 Pro, Visual Studio 2010 Ultimate, Eclipse (Java)
BeitragVerfasst: Do 19.07.07 10:15 
Ich danke euch. Hat alles prima geklappt.
Klabautermann
ontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic star
Veteran
Beiträge: 6366
Erhaltene Danke: 60

Windows 7, Ubuntu
Delphi 7 Prof.
BeitragVerfasst: Do 19.07.07 13:21 
Hi,

bevor hier noch eine frage kommt mache ich das Thema mal zu. Bitte öffne für neue Fragen auch ein neues Topic. So haben zukünftige user mit einem ähnlichen Problem eine bessere Chance die Lösung auch im Forum zu finden.

Gruß
Klabautermann
Dieses Thema ist gesperrt, Du kannst keine Beiträge editieren oder beantworten.

Das Thema wurde von einem Team-Mitglied geschlossen. Wenn du mit der Schließung des Themas nicht einverstanden bist, kontaktiere bitte das Team.