Вопрос Можно ли украсить Прогресс Бар...

EvilAlex

Старожил
Всем доброго времени суток!
Дело было вечером делать было нечего)))
Возник вопрос, возможно ли на ботве реализовать красивый прогресс бар(в дальнейшем ПБ). Все что я знаю. что можно сделать заполняемый с растяжением картинки и заполнением кусками. А можно ли сделать так чтобы картинка появлялась плавно не растягиваясь и не кусками ?

Как пример...
20-Animated-CSS-Progress-Bar-by-Sascha-Michael-Trinkaus.jpg

В общем в чем задумка. 3 картинки... 1 рамка ПБ, 2 сам БП и 3 картинка огонек. полоска или что-то еще что определяло бы степень прогресса после которой появлялся сам прогресс бар, не растягиваясь, а именно как будто он там есть, но проявлялся только после того как ползунок пройдет...

Также еще хотел узнать. возможно ли реализовать чтобы проценты шли за ПБ или в нем.
067.jpg238-295x147.jpg

или самый простой пример с закруглением... Принцип как у первого, просто перед ПБ шла бы закругленная часть...
free-psd-loading-bars-17.jpg
 
Последнее редактирование:

Nemko

Дилетант
Модератор
EvilAlex, по по воду первого "скрина" пытался(когда-то) реализовать со свечением, вот что получилось(внизу немного подредактировал). Думаю не поздно( :$ ), а так TLabel прикрутить тот же принцип будет.
 

Вложения

  • 65.5 KB Просмотры: 59

nizcoz

Участник
@Nemko How to move this progressbar in the same page? (right, left, up, down), and how to show this progressbar at uninstaller?
 

nizcoz

Участник
@Nemko Hi! If I do not use this progress bar, when I cancel the installation I see a message: undo changes, but when using this bar, when canceling the installation, labeltimes remain too. How do I eliminate them? (sorry for my bad english). Thanks!!
 

Nemko

Дилетант
Модератор
How to move this progressbar in the same page? (right, left, up, down), and how to show this progressbar at uninstaller?
nizcoz, to change the coordinates of the upper-left corner, you can use this procedure (with width and height there are problems with drawing ImgSetVisiblePart, difficult):
Код:
procedure ImgPBSetPos(var ProgressBar: ImgProgressBar; Left, Top: Integer);
begin
  ProgressBar.Left:=Left; ProgressBar.Top:=Top;
  ProgressBar.PxLeft:=Left-(ProgressBar.PxBox div 2);
  ImgSetPosition(ProgressBar.BackGroundImg, ProgressBar.Left, ProgressBar.Top, ProgressBar.MaxWidth, ProgressBar.Height);
  ImgSetPosition(ProgressBar.TextureImg, ProgressBar.Left, ProgressBar.Top, ProgressBar.Width, ProgressBar.Height);
  ImgSetPosition(ProgressBar.PxImg1, Left-(ProgressBar.PxBox div 2), Top-(ProgressBar.PxBox div 2), ProgressBar.Width, ProgressBar.Height);
  ImgPBSetPosition(ProgressBar, ImgPBGetPosition(ProgressBar));
  ImgApplyChanges(ProgressBar.hParent);
end;
If I do not use this progress bar, when I cancel the installation I see a message: undo changes, but when using this bar, when canceling the installation, labeltimes remain too. How do I eliminate them?
use procedure HideControls.
 

nizcoz

Участник
@Nemko Hi! procedure HideControls does not work. And.... this progress bar shows the displacement of the bar from 3 or 4%, before it seems that there is no movement, how to solve this? Thank you very much!!! (sorry for my bad english)
 

Nemko

Дилетант
Модератор
nizcoz, hi, may just need to redraw the image, do without retreat. As in the example, from the bottom:
 

Вложения

  • 25.3 KB Просмотры: 20

nizcoz

Участник
This is my procedure HideControls:

Код:
procedure HideControls;
begin
  ImgPBSetVisibility(ProgressBarEx, False);//
  WizardForm.FileNamelabel.Hide;
  ISDoneProgressBar1.Hide;
  LabelPct1.Hide;
  LabelCurrFileName.Hide;
  LabelTime1.Hide;
  LabelTime2.Hide;
  MyCancelButton.Hide;
#ifdef SecondProgressBar
  ISDoneProgressBar2.Hide;
  LabelPct2.Hide;
#endif
end;
but no work!
 
Сверху