Trax Posted February 22, 2021 Posted February 22, 2021 I search and came close to finding what I wanted but not quite. I have a "status" listbox that I show system messages in. It always put the current message at the top and scrolls what is already there down. What I would like to do is add a "Color" parameter which will set the color on current line of text about to be inserted. Here is the function I use to insert the text in the very first position of the listbox: Func ScrollData($Column, $Value) _GUICtrlListBox_BeginUpdate($Column) _GUICtrlListBox_InsertString($Column, $Value, 0) _GUICtrlListBox_SetCurSel ($Column, 0) _GUICtrlListBox_EndUpdate($Column) EndFunc
Nine Posted February 22, 2021 Posted February 22, 2021 Use ListView instead. You can color each line separately. “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) Debug Messages Monitor UDF Screen Scraping Round Corner GUI UDF Multi-Threading Made Easy Interface Object based on Tag
Zedna Posted February 22, 2021 Posted February 22, 2021 (edited) Or use RichEdit control, see: #include "RichEdit.au3" _GUICtrlRichEdit_Create(...) EDIT: also: _GUICtrlRichEdit_SetCharColor() _GUICtrlRichEdit_AppendText() Edited February 22, 2021 by Zedna Resources UDF ResourcesEx UDF AutoIt Forum Search
Trax Posted February 23, 2021 Author Posted February 23, 2021 I have been looking at the ListView and haven't been able to find any example of a scrolling list where you insert an item in the top of the list and it move the rest down one. Do you know of any examples along that line?
Zedna Posted February 23, 2021 Posted February 23, 2021 Here is the code that Scrolls ListView to end: _GUICtrlListView_EnsureVisible($hListView, _GUICtrlListView_GetItemCount($hListView)-1) Resources UDF ResourcesEx UDF AutoIt Forum Search
Trax Posted February 23, 2021 Author Posted February 23, 2021 Thanks you both for the time your have invested in helping me. It looks like ListView might be the way to go. What I am actually doing is trying to recreate a program written years ago for someone in Access. The guy retired and I am playing around with re-coding it in AutoIt. A screenshot of the old program is attached. I have already coded that part that collects the information and I have stored it in a Sqlite database. Each line in the GUI below is one row in Sqlite. The part that is going to be the killer is re-vreating this "Viewer". Based on the screenshot do you think ListView in conjunction with Koda would be the way to go?
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