Einzelnen Beitrag anzeigen

drama22

Registriert seit: 12. Jan 2013
88 Beiträge
 
#3

AW: Delphi THTMLISTBOX Vertical align ?

  Alt 22. Okt 2014, 17: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

i dont know why THTMLISBOX does not load any image inside it i do as you said but its not working
  Mit Zitat antworten Zitat