Sign in to follow this  
Followers 0
Armand

Implementing a progress bar into a listview ?!

16 posts in this topic

Does anyone have a suggestion ?!

i've done making the 'collapsing/expending' code on a list view [since we can't implement it in au3].

how about a progress bar - possible ?!


[u]My Au3 Scripts:[/u]____________(E)Lephant, A Share download manager (RS/MU etc)Http1.1 Console, The Ez Way!Internet Reconnection Automation Suite & A Macro Recording Tool.SK's Alarm Clock, Playing '.MP3 & .Wav' Files._________________Is GOD a mistake of the Humanity Or the Humanity is a mistake of GOD ?!

Share this post


Link to post
Share on other sites



Are you trying to insert a progressbar into a cell in yor listview?

Share this post


Link to post
Share on other sites

@Volly

thanks alot, that helped ...

@weaponx

yes!

I want to insert a progress bar into a 'SubItem' in my list-view.


[u]My Au3 Scripts:[/u]____________(E)Lephant, A Share download manager (RS/MU etc)Http1.1 Console, The Ez Way!Internet Reconnection Automation Suite & A Macro Recording Tool.SK's Alarm Clock, Playing '.MP3 & .Wav' Files._________________Is GOD a mistake of the Humanity Or the Humanity is a mistake of GOD ?!

Share this post


Link to post
Share on other sites

#5 ·  Posted (edited)

You don't have a habit of posting what exactly you have tried so far, have you...

ANyway, logical steps would be - give listview $WS_CLIPSIBLIGS style, get x,y,w,h of subitem relative to the main gui using _GUICtrlListView_GetSubItemRect and ControlGetPos. Then create progress bar using these coords, and set its state to $GUI_ONTOP.

Edited by Siao

"be smart, drink your wine"

Share this post


Link to post
Share on other sites

well.. i didn't give any example cause i haven't tried it yet... this is the first time i've been thinking about it...

-> anyhow, that's the traditional way of doing it ?!

should i like then insert all these new progressbars into an array so that i'll be able to use it next ?!

p.S - it's a download manager... i want to make it look more like e-mule....


[u]My Au3 Scripts:[/u]____________(E)Lephant, A Share download manager (RS/MU etc)Http1.1 Console, The Ez Way!Internet Reconnection Automation Suite & A Macro Recording Tool.SK's Alarm Clock, Playing '.MP3 & .Wav' Files._________________Is GOD a mistake of the Humanity Or the Humanity is a mistake of GOD ?!

Share this post


Link to post
Share on other sites

This is a tricky one. I was thinking bitmaps could be placed in the cells using the _GUICtrlListView* functions.

I tried creating an imagelist with 100 elements, each being a bitmap representing a progress bar at a certain percentage. I am having difficulty since all of the bitmaps have to have the same dimensions in an imagelist.

Share this post


Link to post
Share on other sites

Don't forget the easy way out and just show a numeric value 8D


[u]Helpful tips:[/u]If you want better answers to your questions, take the time to reproduce your issue in a small "stand alone" example script whenever possible. Also, make sure you tell us 1) what you tried, 2) what you expected to happen, and 3) what happened instead.[u]Useful links:[/u]BrettF's update to LxP's "How to AutoIt" pdfValuater's Autoit 1-2-3 Download page for the latest versions of Autoit and SciTE[quote]<glyph> For example - if you came in here asking "how do I use a jackhammer" we might ask "why do you need to use a jackhammer"<glyph> If the answer to the latter question is "to knock my grandmother's head off to let out the evil spirits that gave her cancer", then maybe the problem is actually unrelated to jackhammers[/quote]

Share this post


Link to post
Share on other sites

@SpookMeister

The Ez-Way is a lame way... already thought about it but it looks a bit unprofessional !!!


[u]My Au3 Scripts:[/u]____________(E)Lephant, A Share download manager (RS/MU etc)Http1.1 Console, The Ez Way!Internet Reconnection Automation Suite & A Macro Recording Tool.SK's Alarm Clock, Playing '.MP3 & .Wav' Files._________________Is GOD a mistake of the Humanity Or the Humanity is a mistake of GOD ?!

Share this post


Link to post
Share on other sites

I would just cheat and do it like this:

#include <GUIConstants.au3>

Opt("GUIDataSeparatorChar",";")

GUICreate("listview items",600,200)

$listview = GUICtrlCreateListView ("Progress                             ;Filename",10,10,580,150)
$item1=GUICtrlCreateListViewItem(PercentageToString(100) & ";C:\temp\Mozilla Firefox.exe",$listview)
$item2=GUICtrlCreateListViewItem(PercentageToString(75) & ";C:\temp\Spybot.exe",$listview)
$item3=GUICtrlCreateListViewItem(PercentageToString(50) & ";C:\temp\Adaware.exe",$listview)
$item4=GUICtrlCreateListViewItem(PercentageToString(25) & ";C:\temp\Adobe Reader.exe",$listview)
$item5=GUICtrlCreateListViewItem(PercentageToString(0) & ";C:\temp\Whatever.exe",$listview)

GUISetState()

Do
  $msg = GUIGetMsg ()
     
   Select
      Case $msg = $listview
         MsgBox(0,"listview", "clicked="& GUICtrlGetState($listview),2)
   EndSelect
Until $msg = $GUI_EVENT_CLOSE

;$percent should be numeric only
Func PercentageToString($percent)
    $char = "|"
    $output = ""
    $length = 20
    
    ;100% = 20 characters, 20% = 4 chars, 25% = 5 chars, 50% = 10 chars
    $count = Int(($percent / 100) * $length)
    
    For $X = 1 to $count
        $output &= $char
    Next
    
    Return $output & " " & $percent & "%"
EndFunc

Share this post


Link to post
Share on other sites

@SpookMeister

The Ez-Way is a lame way... already thought about it but it looks a bit unprofessional !!!

So does 1200 punctuation marks on the end of a sentence. There are many programs that have numerical progess bars and if you do it right it will look just as good as those. worst case you could just have a white background where your progress bar is and have it look like its in a list view.

Share this post


Link to post
Share on other sites

@Mast3rpyr0

well... i don't mean to have any argue or to annoy u in any way...

-> i'm just looking for some help and idea :)

_____________________

i've already used pictures + numerical progress and now i want to improve it...

au3 doesn't support collapsing/expending through listview either but yet i've managed to build it myself... i'd rather not use the ez-way out though it's always nice to hear ideas !!!

thanks in advance and sorry if my "!!!" before got u pissed-off.

p.s - english isn't my mother language !


[u]My Au3 Scripts:[/u]____________(E)Lephant, A Share download manager (RS/MU etc)Http1.1 Console, The Ez Way!Internet Reconnection Automation Suite & A Macro Recording Tool.SK's Alarm Clock, Playing '.MP3 & .Wav' Files._________________Is GOD a mistake of the Humanity Or the Humanity is a mistake of GOD ?!

Share this post


Link to post
Share on other sites

@Mast3rpyr0

well... i don't mean to have any argue or to annoy u in any way...

-> i'm just looking for some help and idea :)

_____________________

i've already used pictures + numerical progress and now i want to improve it...

au3 doesn't support collapsing/expending through listview either but yet i've managed to build it myself... i'd rather not use the ez-way out though it's always nice to hear ideas !!!

thanks in advance and sorry if my "!!!" before got u pissed-off.

p.s - english isn't my mother language !

:) its fine but i really hate it when i see something like: OMFG HELP I NEED HELP WHAT DO I DO !?!?!?!?!?!?!?!?!?!?????!!!??!?!?!11

lol

are you sure you dont like the ez-way out... (looks at Armand's Sig)

"Http1.1 Console, The Ez Way!" :)

Share this post


Link to post
Share on other sites

Does anyone have a suggestion ?!

i've done making the 'collapsing/expending' code on a list view [since we can't implement it in au3].

how about a progress bar - possible ?!

Check out this thread by eltorro with later contributions by JohnBailey: http://www.autoitscript.com/forum/index.php?showtopic=44132

The demos showed all kinds of cool inplace stuff with listviews, including progress bar.

Unfortunately, you'll have some code updating to do since the _GuiListView & other functions haven't been updated to reflect the new naming conventions in AutoIt v3.2.10.0

Share this post


Link to post
Share on other sites

how old is this version bahhh....

anyhow here is a copy of it - working, but kinda bugged... [the conversion's fault i guess]

Thanks a lot, i was in a need of some DEMO to work with, it seems just like what i was needing just that it doesn't look that pretty while scrolling, i'll work something out :)

THANKS ALOT TO ALL WHOM HAVE HELPED !!!!


[u]My Au3 Scripts:[/u]____________(E)Lephant, A Share download manager (RS/MU etc)Http1.1 Console, The Ez Way!Internet Reconnection Automation Suite & A Macro Recording Tool.SK's Alarm Clock, Playing '.MP3 & .Wav' Files._________________Is GOD a mistake of the Humanity Or the Humanity is a mistake of GOD ?!

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0