Autor Beitrag
Urba
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 47



BeitragVerfasst: Sa 19.04.03 12:48 
Hallo Leute,

Ich habe einen Stringgrid und hätte gerne dass die vertikale Scrollbar IMMER angezeigt wird, sprich unabhängig davon ob ob die Felder die die Größe des Stringgrids überragen. Einfach immer. Selbst wenn nur 1 Datensatz vorkommt.

Kann mir hierbei jemand helfen ?

MfG
Urba

_________________
Es gibt keine blöden Fragen, nur blöde Antworten :)
delphijanka
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 151

WinXP
D 2009 Arc., Java, C
BeitragVerfasst: Mo 03.08.09 15:12 
Die Frage bleibt in Kraft. Wenn es jemand weiss, bitte schreiben.
elundril
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 3747
Erhaltene Danke: 123

Windows Vista, Ubuntu
Delphi 7 PE "Codename: Aurora", Eclipse Ganymede
BeitragVerfasst: Mo 03.08.09 15:16 
Es gibt eine Eigenschaft von TStringGrid mit dem Namen ScrollBars. Diese einfach auf ssBoth setzen und das wars eigentlich.

lg elundril

_________________
This Signature-Space is intentionally left blank.
Bei Beschwerden, bitte den Beschwerdebutton (gekennzeichnet mit PN) verwenden.
delphijanka
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 151

WinXP
D 2009 Arc., Java, C
BeitragVerfasst: Mo 03.08.09 15:23 
Ne, es geht nicht. Wenn die Datensatzmenge kleiner ist als die maximale in der Anzeige darzustellende Menge, dann wird das Scrollbar automatisch deaktiviert. Soll aber nur ausgeblendet werden.
Xentar
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 2077
Erhaltene Danke: 2

Win XP
Delphi 5 Ent., Delphi 2007 Prof
BeitragVerfasst: Mo 03.08.09 15:53 
Wasn jetzt? Soll die Scrollbar deaktiviert, oder ausgeblendet werden?

Im ersten Beitrag schreibst du, dass sie angezeigt werden soll. Das geht mit Scrollbars = ssBoth.
Nun schreibst du, sie soll ausgeblendet werden.

_________________
PROGRAMMER: A device for converting coffee into software.
delphijanka
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 151

WinXP
D 2009 Arc., Java, C
BeitragVerfasst: Mo 03.08.09 16:19 
@Xentar:

vlcht habe ich mich falsch ausgedrückt. Also wenn Scroll nicht nötig sein soll (aufgrund der kleinen Anzahl der Zeilen), soll er nicht verschwinden, sondern nur grau, nicht funktionierend werden.
Xentar
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 2077
Erhaltene Danke: 2

Win XP
Delphi 5 Ent., Delphi 2007 Prof
BeitragVerfasst: Mo 03.08.09 16:35 
Genau das passiert doch bei Scrollbars := ssBoth.
Die Dinger sind sichtbar, aber ohne Funktion (grau).

_________________
PROGRAMMER: A device for converting coffee into software.
delphijanka
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 151

WinXP
D 2009 Arc., Java, C
BeitragVerfasst: Mo 03.08.09 16:52 
Vlcht ist es so bei Delphi 5, Bei Delphi 2009 stelle ich sie auf ssBoth, und sie werden nicht angezeigt, wenn die Zeilenanzahl klein ist.
Xentar
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 2077
Erhaltene Danke: 2

Win XP
Delphi 5 Ent., Delphi 2007 Prof
BeitragVerfasst: Mo 03.08.09 17:01 
Hmm, stimmt, verdammt.
Habs grad überhaupt erstmal ausprobiert (D2007), und du hast recht, es geht nicht.
Warum ist das beim Memo so, aber nicht beim StringGrid?

Ich nehm alles zurück, sorry, und muss zugeben, dass ich dir dann nicht helfen kann.

_________________
PROGRAMMER: A device for converting coffee into software.
Hobby-Programmierer
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 238
Erhaltene Danke: 4

Win XP Pro, Vista Ultimate Trial :o)
D6 Pro, D7 Pro, Turbo, XE SE
BeitragVerfasst: Di 04.08.09 01:09 
Moin ..,
ich hatte irgendwo mal ne Funktion mit 'SetWindowlong' finde die aber nimmmer. :?
Vielleicht tuts aber auch
ausblenden Delphi-Quelltext
1:
2:
if not Bool(GetWindowlong(hHandle, GWL_STYLE) and WS_VSCROLL) then
  ShowScrollBar(hHandle, SB_VERT, true);
Allerdings wird die Sb nicht ausgegraut!