StungStang Posted January 11, 2011 Share Posted January 11, 2011 Hi to all, i've another question for you =P For example i've this code : #include <ButtonConstants.au3> #include <GUIConstantsEx.au3> #include <ListViewConstants.au3> #include <WindowsConstants.au3> #Region ### START Koda GUI section ### Form= $Form1 = GUICreate("Form1", 357, 169, 192, 124) $listview = GUICtrlCreateListView("Try it", 0, 40, 354, 126) $Button1 = GUICtrlCreateButton("Previous Item", 8, 8, 75, 25, $WS_GROUP) $Button2 = GUICtrlCreateButton("Next Item", 96, 8, 75, 25, $WS_GROUP) GUISetState(@SW_SHOW) #EndRegion ### END Koda GUI section ### GUICtrlCreateListViewItem("Item1", $listview) GUICtrlCreateListViewItem("Item2", $listview) GUICtrlCreateListViewItem("Item3", $listview) GUICtrlCreateListViewItem("Item4", $listview) While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit Case $Button1 ;I would like to select the previous listview item Case $Button2 ;I would like to select the next listview item EndSwitch WEnd If i press button 1 or 2 i would like to select the previos or next listview iteam...how i can do that? P.S. There is a metod to use an icon like as a button? How? Thanks to all for support Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted January 11, 2011 Moderators Share Posted January 11, 2011 StungStang, Here you go: expandcollapse popup#include <GUIConstantsEx.au3> #include <ButtonConstants.au3> #include <GuiListView.au3> $hGUI = GUICreate("Test", 360, 170) $hListView = GUICtrlCreateListView("Try it", 10, 40, 340, 120) $hButton_Prev = GUICtrlCreateButton("Previous Item", 10, 10, 75, 25) $hButton_Next = GUICtrlCreateButton("Next Item", 100, 10, 75, 25) $hButton_Icon = GUICtrlCreateButton("", 200, 10, 25, 25, $BS_ICON) GUICtrlSetImage(-1, "C:\Program Files\AutoIt3\Icons\au3.ico") GUISetState(@SW_SHOW) For $i = 1 To 4 GUICtrlCreateListViewItem("Item " & $i, $hListView) Next _GUICtrlListView_SetItemState($hListView, 0, $LVIS_SELECTED, $LVIS_SELECTED) While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit Case $hButton_Prev _Selector(1) Case $hButton_Next _Selector() Case $hButton_Icon MsgBox(0, "Hi!", "I am an icon button!") EndSwitch WEnd Func _Selector($iCode = 0) Local $iCount = _GUICtrlListView_GetItemCount($hListView) For $iIndex = $iCode To $iCount + $iCode - 2 If _GUICtrlListView_GetItemState($hListView, $iIndex, $LVIS_SELECTED) <> 0 Then _GUICtrlListView_SetItemState($hListView, $iIndex - (2 * $iCode) + 1, $LVIS_SELECTED, $LVIS_SELECTED) ExitLoop EndIf Next GUICtrlSetState($hListView, $GUI_FOCUS) EndFunc M23 Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area Link to comment Share on other sites More sharing options...
StungStang Posted January 11, 2011 Author Share Posted January 11, 2011 Thanks a lot, your script work good ...i have only one question...The button with icon work well, there is a method to display only the icon, without the square button below?...This square on icon background is very orrible Thanks a lot hi! Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted January 11, 2011 Moderators Share Posted January 11, 2011 StungStang, I asked you yesterday if the dog had eaten your Help file - do you ever look at it before posting? #include <GUIConstantsEx.au3> $hGUI = GUICreate("Test", 500, 500) $hIcon = GUICtrlCreateIcon("C:\Program Files\AutoIt3\Icons\au3.ico", -1, 10, 10, 25, 25) GUISetState() While 1 Switch GUIGetMsg() Case $GUI_EVENT_CLOSE Exit Case $hIcon MsgBox(0, "Hi!", "I am an icon!") EndSwitch WEnd Why not try and read a bit of the Help file each night before you go to sleep. It will help reduce the frustration level you feel when you are stuck on simple questions like this. M23 Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area Link to comment Share on other sites More sharing options...
StungStang Posted January 11, 2011 Author Share Posted January 11, 2011 mmm im try to get an effect like this...but no one of this function do the same :/ Look that...you think that it was a button?...it don't seems to be, look : You know witch function to do that? It appareals very good This is a video dimostration : http://www.megaupload.com/?d=35KTUGOW I've uploaded on megaupload becaouse youtube aren't working >_> Hi! Link to comment Share on other sites More sharing options...
StungStang Posted January 12, 2011 Author Share Posted January 12, 2011 Up Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted January 12, 2011 Moderators Share Posted January 12, 2011 StungStang, The downloaded file does not run, so no-one has any idea what you want. M23 Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area Link to comment Share on other sites More sharing options...
StungStang Posted January 12, 2011 Author Share Posted January 12, 2011 Ok no problem M23 YouTube now work and you can see this example : Hi and thanks for help Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted January 12, 2011 Moderators Share Posted January 12, 2011 StungStang,Take a look at the GuiToolbar UDF in the Help file - not exactly the same, but probably as close as you will get in AutoIt. M23 Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area Link to comment Share on other sites More sharing options...
StungStang Posted January 12, 2011 Author Share Posted January 12, 2011 (edited) @Melba This "toolbar" was made with autoit, but unfortunately it's closed source, and i cant know what function the user have used...no idea to do the same great effect? P.S. It's seems to be the same function Thanks for your help...very very good =) Edited January 12, 2011 by StungStang Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted January 12, 2011 Moderators Share Posted January 12, 2011 StungStang, Where did you get the compiled AutoIt file? Could you post it here? What does the Window Info tool say about it? If it came from the forum then we might be able to find out a bit more about it. M23 Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area Link to comment Share on other sites More sharing options...
StungStang Posted January 12, 2011 Author Share Posted January 12, 2011 @Melba This programm is not avaiable in this forum, i found it on german autoit forum I don't know if the author agree my post here If you want i can link to pm the link Hi! Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted January 12, 2011 Moderators Share Posted January 12, 2011 StungStang, If it was on a public forum then posting the link here is no problem. M23 Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area Link to comment Share on other sites More sharing options...
Raupi Posted January 12, 2011 Share Posted January 12, 2011 (edited) The Author of the Program in the Example is Deepred92.The Name of the Program is Desktop Radio you can dowload here: http://www.autoit.de/index.php?page=Thread&postID=50443#post50443 Code for the Toolbar you can found here: http://www.autoit.de/index.php?page=Thread&postID=92143#post92143Raupi Edited January 12, 2011 by Raupi Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now