Autor Beitrag
Tabakbrummel
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 124

win 7
Turbo Delphi, VS 20010 Express
BeitragVerfasst: Do 09.11.06 13:15 
Hallo

Ich habe eineForm von Turbo Delphi mit 2 Panele und die SMDBGrid erstellt, Panel1 = alclient
und Panel2 = albottom. Mein Problem ist wenn ich die Form zur Laufzeit grösser mache kommt die Grid nicht mit. Wie kann man das ändern?

ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
uses SMDBGrid;

procedure TForm1.FormCreate(Sender: TObject);
var
  SMDBGrid1 : TSMDBGrid;
begin
  SMDBGrid1 := TSMDBGrid.Create(self);
  with SMDBGrid1 do
    begin
      Parent := Form1;
      DataSource := DS;
      TabOrder := 32;
      TitleFont.Charset := DEFAULT_CHARSET;
      TitleFont.Color := clWindowText;
      TitleFont.Height := -11;
      TitleFont.Name := 'Tahoma';
      TitleFont.Style := [];
      Flat := False;
      BandsFont.Charset := DEFAULT_CHARSET;
      BandsFont.Color := clWindowText;
      BandsFont.Height := -11;
      BandsFont.Name := 'Tahoma';
      BandsFont.Style := [];
      GridStyle.Style := gsAquaBlue;
    end;
   SMDBGrid1.Columns[0].Visible := false;
   SMDBGrid1.Align := alclient;
end;

_________________
MfG
Tabakbrummel
uwewo
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 154



BeitragVerfasst: Do 09.11.06 14:06 
In welchem Panel hast Du das SMDBGrid eingebaut, oder wie sieht das überhaupt aus??
Tabakbrummel Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 124

win 7
Turbo Delphi, VS 20010 Express
BeitragVerfasst: Do 09.11.06 14:09 
Hallo uwewo

Auf den Panel1 habe ich das Panel2 Height 41 und dann die Grid auf Panel1 sollsie sein.

_________________
MfG
Tabakbrummel
uwewo
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 154



BeitragVerfasst: Do 09.11.06 14:17 
Also beides in Panel1!

Dann

Panel2 = alBottom
SMDBGrid = alclient

That's all
Tabakbrummel Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 124

win 7
Turbo Delphi, VS 20010 Express
BeitragVerfasst: Do 09.11.06 14:19 
Hallo uwewo

Ja so ist es denn das Panel2 ist als ButtonPanal.

_________________
MfG
Tabakbrummel
uwewo
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 154



BeitragVerfasst: Do 09.11.06 14:38 
Warum ist es plötzlich ein ButtonPanal. und was zu teufel ist das???

Warum überhaupt Panel1 wenn dieses auf alClient steht.
Tabakbrummel Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 124

win 7
Turbo Delphi, VS 20010 Express
BeitragVerfasst: Do 09.11.06 14:44 
Hallo

Auf den Panel2 habe die Button(1,2,3,4) drauf. Ich möchte es so haben das wenn die form vergösser oder verkleinert das panel2 mit den bttonsund die SMDBGrid mit gehen, dewegen beides auf Panel1.

_________________
MfG
Tabakbrummel
uwewo
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 154



BeitragVerfasst: Do 09.11.06 15:29 
Platziere ein Panel und das SMDBGrid auf dem Form

setze Panel = alBottom
Anchors
akLeft = True
akRight = True
akTop = False
akBottom = True

SMDBGrid = alClient
Anchors
akLeft = True
akRight = True
akTop = True
akBottom = True
dann die Buttons auf das Panel

beim verändern der Grösse von Form wird sich nur das Grid in der Größe ändern
Panel bleibt gleich.
uwewo
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 154



BeitragVerfasst: Do 09.11.06 15:30 
Platziere ein Panel und das SMDBGrid auf dem Form

setze Panel = alBottom
Anchors
akLeft = True
akRight = True
akTop = False
akBottom = True

SMDBGrid = alClient
Anchors
akLeft = True
akRight = True
akTop = True
akBottom = True
dann die Buttons auf das Panel

beim verändern der Grösse von Form wird sich nur das Grid in der Größe ändern
Panel bleibt gleich.