H
hying95
Unregistered / Unconfirmed
GUEST, unregistred user!
窗体上控件:button1,combobox1,panel1
当label的Transparent:=true;显示有问题,怎样解决?
procedure TForm1.Button1Click(Sender: TObject);
begin
_ini:=tinifile.Create('./program.ini');
combobox1.Clear;
_ini.ReadSections(combobox1.Items);
end;
procedure TForm1.ComboBox1Change(Sender: TObject);
var
i: integer;
Lb: array of TLabel;
sLis: TStrings;
begin
sLis:=tstringlist.Create;
_ini.ReadSectionValues(combobox1.Text,sLis);
SetLength(Lb,sLis.Count);
for i := 0 to Length(Lb) - 1 do
Begin
Lb := Tlabel.Create(Form1);
with Lb do
begin
Parent := Panel1;
if i mod 2<>0 then
font.Color:=clFuchsia;
Left := 12;
Height := 24;
Width := 108;
Top := i * 24+50;
Transparent:=true;//注释这行没有问题,有这行代码caption值有变化时,有重影,上次显示内容还在,后显示重在上面,变花了,如何解决?
Caption :=sLis.Strings;
Show;
End;
end;
sLis.Free;
end;
当label的Transparent:=true;显示有问题,怎样解决?
procedure TForm1.Button1Click(Sender: TObject);
begin
_ini:=tinifile.Create('./program.ini');
combobox1.Clear;
_ini.ReadSections(combobox1.Items);
end;
procedure TForm1.ComboBox1Change(Sender: TObject);
var
i: integer;
Lb: array of TLabel;
sLis: TStrings;
begin
sLis:=tstringlist.Create;
_ini.ReadSectionValues(combobox1.Text,sLis);
SetLength(Lb,sLis.Count);
for i := 0 to Length(Lb) - 1 do
Begin
Lb := Tlabel.Create(Form1);
with Lb do
begin
Parent := Panel1;
if i mod 2<>0 then
font.Color:=clFuchsia;
Left := 12;
Height := 24;
Width := 108;
Top := i * 24+50;
Transparent:=true;//注释这行没有问题,有这行代码caption值有变化时,有重影,上次显示内容还在,后显示重在上面,变花了,如何解决?
Caption :=sLis.Strings;
Show;
End;
end;
sLis.Free;
end;