Autor Beitrag
SpeedyFighter1
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 53



BeitragVerfasst: So 18.02.07 18:36 
Huhu

Wie kann ich es denn einstellen, dass wenn das StringGrid angezeigt wird, keines der Felder blau markiert ist ?
Über enable:=false kann ich einstellen, dass man nicht weiter drauf rum drücken kann, aber das Feld links ob in der Ecke ist dann trotzdem blau hervorgehoben.

Danke schon mal im Voraus!

mfg SpeedyFighter1
hansa
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 3079
Erhaltene Danke: 9



BeitragVerfasst: So 18.02.07 19:19 
Setze mal EditorMode auf false.

_________________
Gruß
Hansa
SpeedyFighter1 Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 53



BeitragVerfasst: So 18.02.07 21:37 
Dann ist das Kästchen immernoch blau hinterlegt ... :-/
hansa
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 3079
Erhaltene Danke: 9



BeitragVerfasst: So 18.02.07 22:20 
Tja, die Frage ist hier auch noch nicht ganz klar geklärt. Vielleicht gelingt das ja jetzt. Probiere mal das hier zusätzlich zu dem EditorMode noch :

ausblenden Delphi-Quelltext
1:
2:
// im FormShow :
  sg.Options := sg.Options + [goAlwaysShowEditor];


Vielleicht nützt es was. Finde jedenfalls sonst nichts. Weiß noch, dass die blauen Zellen weg waren, aber irgendwann auch der Cursor. :mrgreen: Da kommen anscheinend irgendwie zwei Sachen zusammen, die nicht richtig passen. Und setze mal eventuell noch Row und Col von Hand.

_________________
Gruß
Hansa
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: Mo 19.02.07 00:22 
Hallo,

einfach übermalen, das hat auch den Vorteil das man weiter mit Row, Col, Selection und OnSelectCell arbeiten kann.

ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
procedure TForm1.StringGrid1DrawCell(Sender: TObject; ACol, ARow: Integer;
  Rect: TRect; State: TGridDrawState);
begin
  with TStringGrid(Sender) do
    if gdSelected in State then
      begin
      Canvas.Brush.Color := Color;
      Canvas.FillRect(Rect);
      Canvas.TextOut(Rect.Left+2,Rect.Top+2,Cells[ACol,ARow]);
      if gdFocused in State then
        Canvas.DrawFocusRect(Rect);
      end;
end;

_________________
MfG Lannes
(Nichts ist nicht Nichts) and ('' <> nil ) and (Pointer('') = nil ) and (@('') <> nil )
hansa
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 3079
Erhaltene Danke: 9



BeitragVerfasst: Mo 19.02.07 00:32 
Lannes ist der wohl umstrittene Stringgrid-König ! :lol: Aber habe soeben ein Grid entdeckt, da ist der Cursor schon wieder nicht zu sehen. Woran liegt das denn jetzt ? Ich muss diese Sache jetzt doch definitiv klären.

P.S.: Geht eigentlich auch durchstreichen beim Editieren ? Falls das schon jemand gesehen hat. Muss jetzt aufpassen. :mrgreen: "umstritten" sollte natürlich "unbestritten" heißen ! :lol:

_________________
Gruß
Hansa
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: Mo 19.02.07 00:47 
[OT]
user profile iconhansa hat folgendes geschrieben:
"umstritten" sollte natürlich "unbestritten" heißen ! :lol:
dachte schon sollte unumstritten heißen :mrgreen: [/OT]

_________________
MfG Lannes
(Nichts ist nicht Nichts) and ('' <> nil ) and (Pointer('') = nil ) and (@('') <> nil )
hansa
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 3079
Erhaltene Danke: 9



BeitragVerfasst: Mo 19.02.07 01:06 
user profile iconLannes hat folgendes geschrieben:
[OT]dachte schon sollte unumstritten heißen :mrgreen: [/OT]


Na gut, ernenne Dich dann jetzt auch noch zum unumstrittenen Retter der deutschen Schriftsprache. Sag aber besser mal, wo der Cursor hin ist. :mrgreen:

_________________
Gruß
Hansa
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: Mo 19.02.07 01:09 
Hallo,
user profile iconhansa hat folgendes geschrieben:
Sag aber besser mal, wo der Cursor hin ist. :mrgreen:
Cursor = Mauszeiger oder Selection/Markierung? und welches Grid meinst Du?

_________________
MfG Lannes
(Nichts ist nicht Nichts) and ('' <> nil ) and (Pointer('') = nil ) and (@('') <> nil )
hansa
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 3079
Erhaltene Danke: 9



BeitragVerfasst: Mo 19.02.07 01:26 
Cursor : senkrechter blinkender Strich (also Schwarz auf weiß, nicht blau usw.). TStringGrid. In das Grid ist relativ viel Funktionalität eingebaut. Per Objektablage. Und die Stringgrid.Objects werden auch benutzt. Jetzt habe ich eine Form, die das ganze macht (1000 Zeilen). Diese Form wird vererbt. Eine Form mit 100 Zeilen geht nicht, eine mit 2000 die geht. Wie gesagt, per OOP abgeleitet. Da stecken also in beiden Fällen die 1000 Zeilen der Vorlage drin. Hilfreich wäre es, schon mal zu wissen, wo der Unterschied ist bzw. wo ein Haken sein könnte. Auf den ersten Blick sehe ich mal nichts.

_________________
Gruß
Hansa
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: Mo 19.02.07 01:59 
Hallo,

Vermutung:
Cursor in der form wird angezeigt wenn der InPlaceEditor aktiv ist.
Cursor verschwindet = Problem im Zusammenhang mit InPlaceEditor :gruebel:

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