Einzelnen Beitrag anzeigen

Volker Z.

Registriert seit: 4. Dez 2012
Ort: Augsburg, Bayern, Süddeutschland
419 Beiträge
 
Delphi XE4 Ultimate
 
#2

AW: Delphi THTMLISTBOX Vertical align ?

  Alt 22. Okt 2014, 15:23
Hello,

Zitat:
[...] any suggestion ?
have you tried it with a blind (transparent) image?
  1. create a transparent gif or png (size 1 x 1 pixel)
  2. put a THTMListBox, TButton and a TPictureContainer component on a form
  3. add your transparent image to the picture container and rename it to "blind_1x1" (not really necessary)
  4. add an OnClick event to your button control
  5. try the following code:
Delphi-Quellcode:
procedure TForm1.Button1Click(Sender: TObject);
var
  i : Integer;
  s : string;
begin
  for i := 0 to 6 do
    begin
      s := IntToStr (HTMListBox1.ItemHeight + 2 * (i + 1));
      HTMListBox1.Items.Add ('<p align="center"><img src="blind_1x1" width="1" height="' + s + '" align="middle">Test ' + s + '</p>')
    end
end;
Maybe it helps.

Greetings
Volker Zeller
  Mit Zitat antworten Zitat