Autor Beitrag
mini_fd
Hält's aus hier
Beiträge: 4



BeitragVerfasst: Fr 04.08.06 09:42 
Wie schaffe ich es das in einem StringGrid weder Zeile, Spalte noch eine Zelle selektierbar ist... das Teil soll scrollbar sein aber nix selektierbar !

Komme da im mom nicht weiter... hat jemand ne idee ?
ManniTwo
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 46

Win XP SP III, Ubuntu 8.04, Debian 5.0
Delphi 5 Pro; Delphi 2005; C++,C# (VS 2005); Java, Ruby (Eclipse)
BeitragVerfasst: Fr 04.08.06 09:51 
keine ahnung obs die eleganteste lösung ist, aber leg ne routine für das OnSelectCell-Event fest, ungefähr so:

ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
procedure TForm1.StringGrid1SelectCell(Sender: TObject; ACol, ARow: Integer;
  var CanSelect: Boolean);
begin
  CanSelect := false;
end;

_________________
Wer andern eine Bratwurst brät, der hat ein Bratwurst-Brat-Gerät, oder anders:
ausblenden Delphi-Quelltext
1:
if Self.BraetAndernEineBratwurst then Self.HasBratwurstBratGeraet := true;					
Lannes
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 2352
Erhaltene Danke: 4

Win XP, 95, 3.11, IE6
D3 Prof, D4 Standard, D2005 PE, TurboDelphi, Lazarus, D2010
BeitragVerfasst: Fr 04.08.06 12:38 
Hallo,

und im FormCreate-Event kann man so die Anfangsselection aufheben:
ausblenden Delphi-Quelltext
1:
StringGrid.Selection := TGridRect(Rect(-1,-1,-1,-1));					

_________________
MfG Lannes
(Nichts ist nicht Nichts) and ('' <> nil ) and (Pointer('') = nil ) and (@('') <> nil )