LarsJ Posted May 1, 2018 Author Share Posted May 1, 2018 No, I'm not working on these multi-line listview items right now. But with the code here I'll never be able to help you with your problem. My listview is a custom drawn listview based on $NM_CUSTOMDRAW notifications contained in $WM_NOTIFY messages. To solve your problem with rows of different heights, you need an owner drawn listview based on $WM_MEASUREITEM messages to define the height of the rows and $WM_DRAWITEM messages to draw the contents of the rows. I think you should ask a question in one of the help forums. There is definitely someone who can help you. Maybe I'll look at the problem myself. x_bennY 1 Controls, File Explorer, ROT objects, UI Automation, Windows Message MonitorCompiled code: Accessing AutoIt variables, DotNet.au3 UDF, Using C# and VB codeShell menus: The Context menu, The Favorites menu. Shell related: Control Panel, System Image ListsGraphics related: Rubik's Cube, OpenGL without external libraries, Navigating in an image, Non-rectangular selectionsListView controls: Colors and fonts, Multi-line header, Multi-line items, Checkboxes and icons, Incremental searchListView controls: Virtual ListViews, Editing cells, Data display functions Link to comment Share on other sites More sharing options...
x_bennY Posted May 11, 2018 Share Posted May 11, 2018 (edited) On 01/05/2018 at 11:45 AM, LarsJ said: No, I'm not working on these multi-line listview items right now. But with the code here I'll never be able to help you with your problem. My listview is a custom drawn listview based on $NM_CUSTOMDRAW notifications contained in $WM_NOTIFY messages. To solve your problem with rows of different heights, you need an owner drawn listview based on $WM_MEASUREITEM messages to define the height of the rows and $WM_DRAWITEM messages to draw the contents of the rows. I think you should ask a question in one of the help forums. There is definitely someone who can help you. Maybe I'll look at the problem myself. Do you have any alteranative in mind just to me try to do until there? I will post there. Edited May 11, 2018 by x_bennY Link to comment Share on other sites More sharing options...
maniootek Posted May 14, 2020 Share Posted May 14, 2020 I spent 1 hour trying to understand the example but message handlers and other stuff seems to be too difficult for me. Is there any simple example, where you just set listview item with string like: Local $my_multiple_line_string = "Line1" & @CRLF & "Line2" & @CRLF & "Line3" _GUICtrlListView_SetItemText_MultipleLines($idListView, $my_multiple_line_string) I am also wondering why message handlers like these are definied in the example, not in the UDF? GUIRegisterMsg( $WM_NOTIFY, "WM_NOTIFY" ) GUIRegisterMsg( $WM_ACTIVATE, "WM_ACTIVATE" ) I just want simple modify my existing large script with the option to add multiple lines to the listview item control. Number of lines are random, sometimes it's 1 line but sometimes it's 5 lines or more. Link to comment Share on other sites More sharing options...
Lion66 Posted January 13, 2023 Share Posted January 13, 2023 Hello. I took an example with two lines and trying to change it so that the LV would be filled gradually in visible mode. Of course, there are no problems with the first lines, but the second additional lines appear only after filling in the LV. Can anyone help me with this? I attach a changed example to show what I want. 2) Two-line listview items - Changed.au3 Link to comment Share on other sites More sharing options...
LarsJ Posted January 13, 2023 Author Share Posted January 13, 2023 Just move Sleep(1000) to the bottom of the loop immediately before Next. Note that while the listview is being populated, the main message loop doesn't work. It's e.g. not possible to close the GUI while the listview is filling. But the WM_NOTIFY message handler still works, so the listview is filled in correctly. Controls, File Explorer, ROT objects, UI Automation, Windows Message MonitorCompiled code: Accessing AutoIt variables, DotNet.au3 UDF, Using C# and VB codeShell menus: The Context menu, The Favorites menu. Shell related: Control Panel, System Image ListsGraphics related: Rubik's Cube, OpenGL without external libraries, Navigating in an image, Non-rectangular selectionsListView controls: Colors and fonts, Multi-line header, Multi-line items, Checkboxes and icons, Incremental searchListView controls: Virtual ListViews, Editing cells, Data display functions Link to comment Share on other sites More sharing options...
Lion66 Posted January 14, 2023 Share Posted January 14, 2023 (edited) Hi LarsJ. Thanks for your response. Unfortunately, move the Sleep does not change the display order. Perhaps I did not explain the desired enough. I want to see the first line in the first line of the LV, then the second line of the same first line of the LV. And so in order. Instead, now I see the first line of the first line of the LV, the first line of the second lines of the LV, etc. All the second lines I see only after filling all the first lines. At the same time, if in the process of filling I will press the mouse inside the LV, then I will see some of the second lines. Hooray. Everything was decided. I remembered one trick and added at the end of the cycle _GUICtrlListView_RedrawItems Perhaps you want to add something, but in any case thanks. And thanks for the original opportunity to do multi line. Edited January 14, 2023 by Lion66 Solution 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