![]() |
Re: Coolbar Band hinzufügen
Ja, erst erstellen, dann drauf zugreifen.
|
Re: Coolbar Band hinzufügen
ich bekomms immernoch nicht hin :(
bin echt bald am durchdrehen :(
Delphi-Quellcode:
so geht nicht!
coolbar1.bands.add;
CoolBar1.Bands['irgendne integer zahl hab aber keine ahnnung wie ich das machen kann dass da immer ne andere drin steht!'].caption := edit1.text; MFG Lars Wiltfang |
Re: Coolbar Band hinzufügen
Hast Du Dir mal Count angesehen?
|
Re: Coolbar Band hinzufügen
ja aber damit habe ich ncihts richtiges himbekommen kannste mir da mal n beispiel für geben (code???). Wäre darüber sehr sehr sehr dankbar :)
|
Re: Coolbar Band hinzufügen
Und ich wäre Dir sehr dankbar, wenn Du mal ab und zu die OH bemühen würdest :stupid: . Aber ich will mal nicht so sein. Das "letzte" Band müsste sein
Delphi-Quellcode:
CoolBar1.Bands[Pred(CoolBar1.Bands.Count)]
|
Re: Coolbar Band hinzufügen
Hallo Larsi,
in der Hilfe von Delphi2007 habe ich folgenden Code gefunden.
Delphi-Quellcode:
Vielleicht hilft er dir weiter.
{
To run this example, add the example code to a new project. The example code dynamically creates a TCoolBar and three TCoolBand objects populated with a windowed control in each TCoolBand. } procedure AddBand(CoolBar: TCoolBar; Const ControlClasses: array of TControlClass); var CurrentControl: TControl; I: Integer; begin for I := 0 to High(ControlClasses) do begin CurrentControl := ControlClasses[i].Create(CoolBar); if (CurrentControl is TWinControl) then begin { Placing the control onto the CoolBar causes the TCoolBar object to create a TCoolBand and place the control within the band. } CurrentControl.Parent := Coolbar; { Get the reference of the last TCoolBand created and assign text. } with CoolBar.Bands do Items[count - 1].Text := CurrentControl.ClassName; end; end; end; procedure TForm1.FormCreate(Sender: TObject); var CoolBar: TCoolBar; begin CoolBar := TCoolBar.Create(Self); CoolBar.Parent := Self; CoolBar.Align := alClient; AddBand(CoolBar, [TCheckBox, TEdit, TButton]); end; gruß Reinhold |
Alle Zeitangaben in WEZ +1. Es ist jetzt 02:29 Uhr. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024-2025 by Thomas Breitkreuz