AGB  ·  Datenschutz  ·  Impressum  







Anmelden
Nützliche Links
Registrieren
Zurück Delphi-PRAXiS Programmierung allgemein Multimedia Delphi THTMLISTBOX Vertical align ?
Thema durchsuchen
Ansicht
Themen-Optionen

Delphi THTMLISTBOX Vertical align ?

Ein Thema von drama22 · begonnen am 22. Okt 2014 · letzter Beitrag vom 22. Okt 2014
Antwort Antwort
drama22

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

Delphi THTMLISTBOX Vertical align ?

  Alt 22. Okt 2014, 08:12
i want to show selected item and all other items in middle position i currently do this to center the item

Delphi-Quellcode:
<p align="center">' + item +
'</p>'
thats centered it but how to get it in middle when Like vertical align

i tested vertical-align but did not work any suggestion ?

i tried to put it in <ul> Tag its kinda working but i dont need the dot beside the name i try to remove it as basic html like

Delphi-Quellcode:
'<ul><li type="none"><p align="center">' + item +
    '</p></li></ul><BR>'
but there is huge height between each item how to control on the item height ?

Geändert von drama22 (22. Okt 2014 um 08:48 Uhr)
  Mit Zitat antworten Zitat
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
drama22

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

AW: Delphi THTMLISTBOX Vertical align ?

  Alt 22. Okt 2014, 18: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
Volker Z.

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

AW: Delphi THTMLISTBOX Vertical align ?

  Alt 22. Okt 2014, 18:36
Hello,

Zitat:
[...] i do as you said but its not working
is your PictureContainer property set (sorry, I forgot to mention)? Check it in the object inspector.

Greetings
Volker Zeller
  Mit Zitat antworten Zitat
drama22

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

AW: Delphi THTMLISTBOX Vertical align ?

  Alt 22. Okt 2014, 19:06
Hello,

Zitat:
[...] i do as you said but its not working
is your PictureContainer property set (sorry, I forgot to mention)? Check it in the object inspector.

Greetings
oh yeah i got it i set picture container and added gif and jpeg and png in my uses Thanks it works but another thing why my animated image does not shows as animated ? in THTMLISTBOX i load the animated images from picture container
  Mit Zitat antworten Zitat
Antwort Antwort


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 23:22 Uhr.
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024 by Thomas Breitkreuz