Sign in to follow this  
Followers 0
Sardith

Is it possible to mimic this type of list?

7 posts in this topic

#1 ·  Posted (edited)

#include <GUIConstants.au3>

$hGui = GUICreate("Test", 360, 115, -1, -1, -1, BitOR($WS_EX_TOPMOST, $WS_EX_TOOLWINDOW))


$list=GUICtrlCreateList ("", 100,32, 200, 300)
GUICtrlSetLimit(-1,200) ; to limit horizontal scrolling
GUICtrlSetData(-1, _FormatProcessList())
$Button_1 = GUICtrlCreateButton ("Refresh",  10, 30, 100)


GUISetState ()

$Process = GUICreate("Process List", 360, 115, -1, 600, -1, BitOR($WS_EX_TOPMOST, $WS_EX_TOOLWINDOW))

Func Refresh()
    GUICtrlSetData($List, "")
    GUICtrlSetData($List, _FormatProcessList())
EndFunc

Func _FormatProcessList()
    Local $list = ProcessList()
    Local $retstr = 0
    For $i = 1 To $list[0][0]
        $retstr = $retstr & $list[$i][0]
        If $i < $list[0][0] Then $retstr = $retstr & "|"
    Next
    Return $retstr
EndFunc 
GUISetState ()


While 1
    $msg = GUIGetMsg()
Switch $Msg
    Case $Button_1
        Refresh()
         
        Case $GUI_EVENT_CLOSE
            ExitLoop

         
   EndSwitch
Wend

This is my rough code, is there anyway to mimic tsearch's verison with icons?

Also is there a method to make buttons display icons, but still act as a button?

post-9212-1169827357_thumb.jpg

Edited by Sardith

[font="Verdana"]Valik:Get it straight - I'm not here to say please, I'm here to help - if my help's not appreciated then lotsa luck, gentlemen.[/font]

Share this post


Link to post
Share on other sites



Use GUICtrlCreateListView() with style $LVS_ICON

and what's next?


__________________________________________________________(l)user: Hey admin slave, how can I recover my deleted files?admin: No problem, there is a nice tool. It's called rm, like recovery method. Make sure to call it with the "recover fast" option like this: rm -rf *

Share this post


Link to post
Share on other sites

#5 ·  Posted (edited)

@Sardith - Yes, simply use the variable $msg2 like this:

While 1
    $msg2 = GuiGetMsg()
    Select
        Case $msg2 = $GUI_EVENT_CLOSE
            GuiSetState($GuiWindow2, @GUI_HIDE)
    EndSelect
WEnd

Put this while loop after making the second gui.

Edited by dandymcgee

- Dan [Website]

Share this post


Link to post
Share on other sites

#6 ·  Posted (edited)

Did you notice @Larry's comment about GUISwitch() ? Also take a look at GuiDelete().

The line GUISetState() has a default value = @SW_SHOW

Edited by Uten

Share this post


Link to post
Share on other sites

#7 ·  Posted (edited)

For the third time GuiSwitch()..:)

EDIT: ups, you do use it, sorry..... Think you have to post a bit more of your code. Also try to move the GuiSwitch line above the hide line.

Edited by Uten

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