AGB  ·  Datenschutz  ·  Impressum  







Anmelden
Nützliche Links
Registrieren
Thema durchsuchen
Ansicht
Themen-Optionen

TStaticText.Transparent funktioniert nicht?

Ein Thema von stz · begonnen am 14. Jul 2006 · letzter Beitrag vom 12. Feb 2016
 
papajong

Registriert seit: 16. Jun 2006
3 Beiträge
 
RAD-Studio 2010 Pro
 
#9

AW: TStaticText.Transparent funktioniert nicht?

  Alt 12. Feb 2016, 15:57
Nur für den Fall, das sich nochmal jemand hierhin verirrt, transparent funktioniert nur,
wenn man das darunterliegende Control zum Parent des TStaticText macht.
PS. Funktioniert auch bei TLabel

unit Unit1;

interface

uses
Winapi.Windows, Winapi.Messages, System.SysUtils, System.Variants, System.Classes, Vcl.Graphics,
Vcl.Controls, Vcl.Forms, Vcl.Dialogs, Vcl.ExtCtrls, Vcl.StdCtrls, Vcl.ComCtrls;

type

TForm1 = class(TForm)
Timer1: TTimer;
ProgressBar1: TProgressBar;
procedure Timer1Timer(Sender: TObject);
procedure FormCreate(Sender: TObject);
private
{ Private-Deklarationen }
FStaticText1: TStaticText;
public
{ Public-Deklarationen }
end;

var
Form1: TForm1;

implementation

{$R *.dfm}

procedure TForm1.FormCreate(Sender: TObject);
begin

FStaticText1 := TStaticText.Create(Self);

with FStaticText1 do
begin
Name := 'StaticText1';
Parent := ProgressBar1;
Left := ProgressBar1.Width div 2;
Top := 1;
Width := 59;
Height := 17;
ParentCustomHint := False;
BiDiMode := bdLeftToRight;
Caption := '';
Color := clBtnFace;
ParentBiDiMode := False;
ParentColor := False;
TabOrder := 1;
Transparent := true;
end;

end;

procedure TForm1.Timer1Timer(Sender: TObject);
begin
ProgressBar1.StepIt;
FStaticText1.Caption := IntToStr(ProgressBar1.Position);
end;

end.

Geändert von papajong (12. Feb 2016 um 16:15 Uhr) Grund: Ergänzung
  Mit Zitat antworten Zitat
 


Forumregeln

Es ist dir nicht erlaubt, neue Themen zu verfassen.
Es ist dir nicht erlaubt, auf Beiträge zu antworten.
Es ist dir nicht erlaubt, Anhänge hochzuladen.
Es ist dir nicht erlaubt, deine Beiträge zu bearbeiten.

BB-Code ist an.
Smileys sind an.
[IMG] Code ist an.
HTML-Code ist aus.
Trackbacks are an
Pingbacks are an
Refbacks are aus

Gehe zu:

Impressum · AGB · Datenschutz · Nach oben
Alle Zeitangaben in WEZ +1. Es ist jetzt 07:35 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 by Thomas Breitkreuz