lucio69f Posted November 15, 2023 Share Posted November 15, 2023 Hi , is possible with autoit listview have this grade of personalization of listview like in this foto, create a histogram and have possibility to click in cell like button is possible ? thanks Link to comment Share on other sites More sharing options...
Nine Posted November 15, 2023 Share Posted November 15, 2023 Yes, you need to ownerdraw all the cells accordingly. https://learn.microsoft.com/en-us/dotnet/desktop/winforms/controls/controls-with-built-in-owner-drawing-support?view=netframeworkdesktop-4.8 “They did not know it was impossible, so they did it” ― Mark Twain Spoiler Block all input without UAC Save/Retrieve Images to/from Text Monitor Management (VCP commands) Tool to search in text (au3) files Date Range Picker Virtual Desktop Manager Sudoku Game 2020 Overlapped Named Pipe IPC HotString 2.0 - Hot keys with string x64 Bitwise Operations Multi-keyboards HotKeySet Recursive Array Display Fast and simple WCD IPC Multiple Folders Selector Printer Manager GIF Animation (cached) Screen Scraping Multi-Threading Made Easy Link to comment Share on other sites More sharing options...
ioa747 Posted November 16, 2023 Share Posted November 16, 2023 there is also the fake mode #include <Array.au3> Local $sTxt = "Apple, Avocado, Apricot, Abiu, Blackberry, Bael, Cranberry, Cherry, Dates, Dragonfruit, Fig, Guava, Grapes, Grapefruit" $aFruit = StringSplit($sTxt, ", ", $STR_ENTIRESPLIT + $STR_NOCOUNT) _ArrayColInsert($aFruit, 1) _ArrayColInsert($aFruit, 1) For $i = 0 To UBound($aFruit) -1 $aFruit[$i][1] = Random(0, 10000, 1) $aFruit[$i][2] = _fBar($aFruit[$i][1]) Next _ArrayDisplay($aFruit) ;---------------------------------------------------------------------------------------- Func _fBar($iNumber, $iUnitCnt = 200) Local $sResult, $iCnt $iCnt = $iNumber / $iUnitCnt For $i = 1 To $iCnt $sResult &= "|" Next Return $sResult EndFunc ;==>_fBar I know that I know nothing Link to comment Share on other sites More sharing options...
lucio69f Posted November 16, 2023 Author Share Posted November 16, 2023 @Nine, sorry but not understund how is possible to do that but thanks for support @ioa747, o nice trick but i must use color for identify volum up and volume down but thanks for support Link to comment Share on other sites More sharing options...
Nine Posted November 16, 2023 Share Posted November 16, 2023 (edited) @lucio69f Alright, I must admit that the link I gave you was NOT the best I could give you. So I made a minimalist example to show you how to display color easily in ListView: expandcollapse popup#include <GUIConstants.au3> #include <GuiListView.au3> Global $hListView, $aColors[3][3] _Example() Func _Example() Local $hGUI = GUICreate("Colored ListView", 350, 250) Local $idListView = GUICtrlCreateListView("Number|Number|Number", 5, 5, 300, 150) $hListView = GUICtrlGetHandle($idListView) GUICtrlCreateListViewItem('1|1|1', $idListView) GUICtrlCreateListViewItem('2|2|2', $idListView) GUICtrlCreateListViewItem('3|3|3', $idListView) ; set background colors $aColors[0][1] = 0xFFAAFF $aColors[1][2] = 0x00AA00 $aColors[2][0] = 0xCCCCCC GUIRegisterMsg($WM_NOTIFY, WM_NOTIFY) GUISetState() While True Switch GUIGetMsg() Case $GUI_EVENT_CLOSE Exit EndSwitch WEnd EndFunc ;==>_Example Func WM_NOTIFY($hWnd, $Msg, $wParam, $lParam) Local $tNMHDR = DllStructCreate($tagNMHDR, $lParam) Switch $tNMHDR.hWndFrom Case $hListView Switch $tNMHDR.Code Case $NM_CUSTOMDRAW Local $tCustDraw = DllStructCreate($tagNMLVCUSTOMDRAW, $lParam) Local $iDrawStage = $tCustDraw.dwDrawStage If $iDrawStage = $CDDS_PREPAINT Then Return $CDRF_NOTIFYITEMDRAW If $iDrawStage = $CDDS_ITEMPREPAINT Then Return $CDRF_NOTIFYSUBITEMDRAW Local $iSubItem = $tCustDraw.iSubItem Local $iItem = $tCustDraw.dwItemSpec If $aColors[$iItem][$iSubItem] Then $tCustDraw.clrTextBk = $aColors[$iItem][$iSubItem] Else $tCustDraw.clrTextBk = 0xFFFFFF EndIf Return $CDRF_NEWFONT EndSwitch EndSwitch Return $GUI_RUNDEFMSG EndFunc ;==>WM_NOTIFY Hope that helps a bit more. MSDN has all the info that you need to understand the process of owner drawing a list view. Edited November 17, 2023 by Nine clean up code robertocm 1 “They did not know it was impossible, so they did it” ― Mark Twain Spoiler Block all input without UAC Save/Retrieve Images to/from Text Monitor Management (VCP commands) Tool to search in text (au3) files Date Range Picker Virtual Desktop Manager Sudoku Game 2020 Overlapped Named Pipe IPC HotString 2.0 - Hot keys with string x64 Bitwise Operations Multi-keyboards HotKeySet Recursive Array Display Fast and simple WCD IPC Multiple Folders Selector Printer Manager GIF Animation (cached) Screen Scraping Multi-Threading Made Easy Link to comment Share on other sites More sharing options...
lucio69f Posted November 16, 2023 Author Share Posted November 16, 2023 woow is very complicated 😨 i suppose not exist another way ?? right? Link to comment Share on other sites More sharing options...
Andreik Posted November 16, 2023 Share Posted November 16, 2023 (edited) I think there is a UDF for ListViews made by Melba (use the search feature of the forum) but I'm not sure how much can be customized. Anyway it's a good start. Edit: here is the link Edited November 16, 2023 by Andreik When the words fail... music speaks. Link to comment Share on other sites More sharing options...
lucio69f Posted November 16, 2023 Author Share Posted November 16, 2023 wooooooooow When I see these UDFs, I really feel stupid. Congratulations, he's truly a great programmer. I wouldn't even get there in a million years, I suppose. Do you think it's possible, through this UDF, to have a kind of colored histogram in the ListView and make a cell clickable with one command, and the cell next to it clickable with another command? Link to comment Share on other sites More sharing options...
Andreik Posted November 16, 2023 Share Posted November 16, 2023 By default I don't think it has all the features that you need but you can try to understand the logic and customize some functions to achieve your goal. When the words fail... music speaks. Link to comment Share on other sites More sharing options...
lucio69f Posted November 16, 2023 Author Share Posted November 16, 2023 1 hour ago, Andreik said: By default I don't think it has all the features that you need but you can try to understand the logic and customize some functions to achieve your goal. woow you belive in me so much , i love you , but i am very bad programmer but thanks Andreik 1 Link to comment Share on other sites More sharing options...
Andreik Posted November 16, 2023 Share Posted November 16, 2023 Isn't you the one who wanted multithreaded sockets few days ago? So you can't say anymore that you are a bad programmer. You just need to try. When the words fail... music speaks. Link to comment Share on other sites More sharing options...
lucio69f Posted November 16, 2023 Author Share Posted November 16, 2023 (edited) 😁yes it's me but the udf of the multithread i assure is much easier Edited November 16, 2023 by lucio69f Link to comment Share on other sites More sharing options...
Andreik Posted November 16, 2023 Share Posted November 16, 2023 I think @jchd patented (at least on the forum) the expression "threads are evil" and this is true in most cases. So I doubt it's as easy as you say but good luck. When the words fail... music speaks. Link to comment Share on other sites More sharing options...
argumentum Posted November 16, 2023 Share Posted November 16, 2023 You can IPC between scripts. Try the Fork UDFish thing I put together. It may be useful to you. ( I am a copy'n'paste programmer if possible ) Follow the link to my code contribution ( and other things too ). FAQ - Please Read Before Posting. Link to comment Share on other sites More sharing options...
jchd Posted November 17, 2023 Share Posted November 17, 2023 8 hours ago, Andreik said: I think @jchd patented (at least on the forum) the expression "threads are evil" I'm only the messenger : https://www2.eecs.berkeley.edu/Pubs/TechRpts/2006/EECS-2006-1.pdf Andreik 1 This wonderful site allows debugging and testing regular expressions (many flavors available). An absolute must have in your bookmarks.Another excellent RegExp tutorial. Don't forget downloading your copy of up-to-date pcretest.exe and pcregrep.exe hereRegExp tutorial: enough to get startedPCRE v8.33 regexp documentation latest available release and currently implemented in AutoIt beta. SQLitespeed is another feature-rich premier SQLite manager (includes import/export). Well worth a try.SQLite Expert (freeware Personal Edition or payware Pro version) is a very useful SQLite database manager.An excellent eBook covering almost every aspect of SQLite3: a must-read for anyone doing serious work.SQL tutorial (covers "generic" SQL, but most of it applies to SQLite as well)A work-in-progress SQLite3 tutorial. Don't miss other LxyzTHW pages!SQLite official website with full documentation (may be newer than the SQLite library that comes standard with AutoIt) Link to comment Share on other sites More sharing options...
Andreik Posted November 17, 2023 Share Posted November 17, 2023 Thanks, I'll have a nice reading. When the words fail... music speaks. Link to comment Share on other sites More sharing options...
lucio69f Posted November 17, 2023 Author Share Posted November 17, 2023 18 hours ago, argumentum said: You can IPC between scripts. Try the Fork UDFish thing I put together. It may be useful to you. ( I am a copy'n'paste programmer if possible ) Nice i will study for the moment i use a thread of this https://github.com/jesobreira/authread , the first i find but sure i look your 9 hours ago, jchd said: I'm only the messenger : https://www2.eecs.berkeley.edu/Pubs/TechRpts/2006/EECS-2006-1.pdf thanks for this paper i read soon,but sometimes it is undeniable that threads are needed 18 hours ago, Andreik said: I think @jchd patented (at least on the forum) the expression "threads are evil" and this is true in most cases. So I doubt it's as easy as you say but good luck. i assure is easy , obviously for my simple project Link to comment Share on other sites More sharing options...
argumentum Posted November 17, 2023 Share Posted November 17, 2023 1 hour ago, lucio69f said: for the moment i use a thread of this https://github.com/jesobreira/authread , the first i find I looked at the code and is forking with an INI file as the IPC that's read every 250 ms. Awful code. Don't believe a claim unless you concur. The only thread in that code is the name. Follow the link to my code contribution ( and other things too ). FAQ - Please Read Before Posting. Link to comment Share on other sites More sharing options...
lucio69f Posted November 17, 2023 Author Share Posted November 17, 2023 2 hours ago, argumentum said: I looked at the code and is forking with an INI file as the IPC that's read every 250 ms. Awful code. Don't believe a claim unless you concur. The only thread in that code is the name. thanks i just started with this UDF i try for the momenti with this but after read your UDF if is easy , to use i could switch , thanks again 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