Jump to content
GreenCan

Listview displaying Multiline text cells

Recommended Posts

GreenCan

This example displays multiline cells (memos) in ListView

Link to Updated example

GreenCan

Edited by GreenCan

Contributions

CheckUpdate - SelfUpdating script ------- Self updating script

Dynamic input validation ------------------- Use a Input masks can make your life easier and Validation can be as simple

MsgBox with CountDown ------------------- MsgBox with visual countdown

Display Multiline text cells in ListView ---- Example of pop-up or ToolTip for multiline text items in ListView

Presentation Manager ---------------------- Program to display and refresh different Border-less GUI's on a Display (large screen TV)

USB Drive Tools ------------------------------ Tool to help you with your USB drive management

Input Period udf ------------------------------ GUI for a period input

Excel ColorPicker ---------------------------- Color pickup tool will allow you to select a color from the standard Excel color palette

Excel Chart UDF ----------------------------- Collaboration project with water 

GetDateInString ------------------------------ Find date/time in a string using a date format notation like DD Mon YYYY hh:mm

TaskListAllDetailed --------------------------- List All Scheduled Tasks

Computer Info --------------------------------- A collection of information for helpdesk

Shared memory Demo ----------------------- Demo: Two applications communicate with each other through means of a memory share (using Nomad function, 32bit only)

Universal Date Format Conversion -------- Universal date converter from your PC local date format to any format

Disable Windows DetailsPane -------------- Disable Windows Explorer Details Pane

Oracle SQL Report Generator -------------  Oracle Report generator using SQL

SQLite Report Generator -------------------  SQLite Report generator using SQL

SQLite ListView and BLOB demo ---------- Demo: shows how binary (image) objects can be recognized natively in a database BLOB field

DSN-Less Database connection demo --- Demo: ActiveX Data Objects DSN-Less Database access

Animated animals ----------------------------- Fun: Moving animated objects

Perforated image in GUI --------------------- Fun: Perforate your image with image objects

UEZ's Perforator major update ------------- Fun: Pro version of Perforator by UEZ

Visual Crop Tool (GUI) ----------------------- Easy to use Visual Image Crop tool

Visual Image effect (GUI) -------------------- Visually apply effects on an image

 

 

 

Share this post


Link to post
Share on other sites
GreenCan

This is another version of a multiline cell text viewer using a pop-up instead of a Tooltip.

This version gets rid of the Tooltip size limitation.

Don't be too shy for feedback :D

Greencan

; example of pop-up for multiline text items
;   by GreenCan

#include <GUIConstants.au3>
#Include <GuiListView.au3>
#include <WindowsConstants.au3>
#include <EditConstants.au3>

MsgBox(0,"Demo","Click on any cell, the cells containing multiple lines" & @CRLF & "will show a popup with the formatted text" & @CRLF & @CRLF & "Change '$NM_CLICK' to '$LVN_HOTTRACK'" & @CRLF & "for a fly-over effect", 10)

Global $iLastItem = -1, $iLastsubitemNR = -1
Global $hGUI_Multiline, $View_Multiline, $ColName ; Multiline cell viewer window
$GUI = GUICreate("Listview with Pop-up for multiline cells")

$hListView = GuiCtrlCreateListView("Title 1", 10, 10, 380, 380,-1, BitOR($LVS_EX_GRIDLINES,$LVS_EX_FULLROWSELECT ))

; fill with example data
    ; Add columns
    _GUICtrlListView_AddColumn ($hListView,  "Title 2", 100)
    _GUICtrlListView_AddColumn ($hListView,  "Title 3", 150)
    
    ; Add some rows
    _GUICtrlListView_AddItem($hListView, "A1", 0)
    _GUICtrlListView_AddSubItem($hListView, 0, "A2" & @CRLF & "Example of multiline text", 1)
    _GUICtrlListView_AddSubItem($hListView, 0, "A3" & @CRLF & "Example of multiline text" & @CRLF & "3rd line", 2)

    _GUICtrlListView_AddItem($hListView, "B1", 1)
    _GUICtrlListView_AddSubItem($hListView, 1, "B2" & @CRLF & "Line 2" & @CRLF & "Line 3" & @CRLF & "Line 4", 1)
    _GUICtrlListView_AddSubItem($hListView, 1, "B3", 2)
    
    _GUICtrlListView_AddItem($hListView, "C1")
    _GUICtrlListView_AddSubItem($hListView, 2, "C2" & @CRLF & "Another multiline text", 1)
    _GUICtrlListView_AddSubItem($hListView, 2, "C3" & @CRLF & "Another Example of multiline text", 2)
; done

GUISetState()
GUIRegisterMsg($WM_NOTIFY, "WM_NOTIFY")

While 1
    Switch GuiGetMsg()
    Case $GUI_EVENT_CLOSE
        ;ToolTip("") ; clean remaining ToolTip from WM_NOTIFY if necessary
        GUIDelete($GUI)
        Exit
    EndSwitch
WEnd
#FUNCTION# ==============================================================
Func WM_NOTIFY($hWnd, $MsgID, $wParam, $lParam)
    Local $hWndFrom, $iIDFrom, $iCode, $tNMHDR, $hWndListView
    $hWndListView = $hListView
    If Not IsHWnd($hListView) Then $hWndListView = GUICtrlGetHandle($hListView)
    
    $tNMHDR = DllStructCreate($tagNMHDR, $lParam)
    $hWndFrom = HWnd(DllStructGetData($tNMHDR, "hWndFrom"))
    $iIDFrom = DllStructGetData($tNMHDR, "IDFrom")
    $iCode = DllStructGetData($tNMHDR, "Code")
    
    Switch $hWndFrom
        Case $hWndListView
            Switch $iCode
            Case $NM_CLICK ; when clicking on a cell that is multiline, a tooltip will display the content
            ;Case $LVN_HOTTRACK; Sent by a list-view control when the user moves the mouse over an item
                    Local $tInfo = DllStructCreate($tagNMLISTVIEW, $lParam)
                    Local $iItem = DllStructGetData($tInfo, "Item")
                    Local $subitemNR = DllStructGetData($tInfo, "SubItem")
                    $Column_attribute =_GUICtrlListView_GetColumn($hListView, $subitemNR)
                    ; if no cell change return without doing anything
                    If $iLastItem = $iItem And $iLastsubitemNR = $subitemNR Then Return 0
                    $iLastItem = $iItem
                    $iLastsubitemNR = $subitemNR
                    
                    Local $sToolTipData = _GUICtrlListView_GetItemText($hListView, $iItem,$subitemNR)
                    $Mypos = StringInStr ( $sToolTipData, @CRLF )
                    If $Mypos > 0 Then 
                        View_MultilineCell($sToolTipData, $Column_attribute[5] & " Row " & $iItem +1)
                    Else
                        View_MultilineCell("")
                        ConsoleWrite("R" & $iItem & "C" & $subitemNR & " No tip" & @CR)
                    EndIf
            EndSwitch
    EndSwitch
        
    Return $GUI_RUNDEFMSG
EndFunc ;==>WM_NOTIFY
#FUNCTION# ==============================================================
Func View_MultilineCell($Cell_content,$Column_name= "")
    Local $Msg2
    
    If $Cell_content = "" Then
        ; clicked on nonmultiline cell, so close the window
        $window_open = WinList ( "Cell Content" )
        If $window_open[0][0] > 0 Then GUIDelete ( $hGUI_Multiline ) 
        Return
    Else
        $window_open = WinList ( "Cell Content" ) ; check if window already exists
        If $window_open[0][0] = 0 Then 
            ; if the window does not exist yet, create it
            Local $window_width = 300
            Local $window_heigth = 300
            $hGUI_Multiline = GUICreate("Cell Content", $window_width, $window_heigth, 1, 1, ( $WS_POPUPWINDOW), $WS_EX_TOPMOST,$GUI)
            $ColName = GUICtrlCreateLabel("Content of " & $Column_name,  10, 2, $window_width) 
            $View_Multiline = GUICtrlCreateEdit($Cell_content, 5, 20, $window_width - 10, $window_heigth - 40, BitOR($ES_AUTOVSCROLL,$ES_AUTOHSCROLL,$ES_READONLY,$ES_WANTRETURN,$WS_HSCROLL,$WS_VSCROLL))
            GUICtrlSetResizing(-1, $GUI_DOCKTOP+$GUI_DOCKBOTTOM)
            GUICtrlSetColor(-1, 0x2601D3)
            GUICtrlSetBkColor(-1, 0xEAFFE8)
            GUICtrlCreateLabel("Click on any non-multiline cell to hide this pop-up", 35, $window_heigth - 15, $window_width)   
            GUICtrlSetFont (-1, 7 , 400 )           
        Else
            ; window already exist so only change the content
            GUICtrlSetData ( $ColName, "Content of " & $Column_name ) ; column title
            GUICtrlSetData ( $View_Multiline, $Cell_content ) ; cell content
        EndIf
        GUISetState()
        Return      
            
    EndIf
EndFunc ;==>View_MultilineCell
#FUNCTION# ==============================================================

Contributions

CheckUpdate - SelfUpdating script ------- Self updating script

Dynamic input validation ------------------- Use a Input masks can make your life easier and Validation can be as simple

MsgBox with CountDown ------------------- MsgBox with visual countdown

Display Multiline text cells in ListView ---- Example of pop-up or ToolTip for multiline text items in ListView

Presentation Manager ---------------------- Program to display and refresh different Border-less GUI's on a Display (large screen TV)

USB Drive Tools ------------------------------ Tool to help you with your USB drive management

Input Period udf ------------------------------ GUI for a period input

Excel ColorPicker ---------------------------- Color pickup tool will allow you to select a color from the standard Excel color palette

Excel Chart UDF ----------------------------- Collaboration project with water 

GetDateInString ------------------------------ Find date/time in a string using a date format notation like DD Mon YYYY hh:mm

TaskListAllDetailed --------------------------- List All Scheduled Tasks

Computer Info --------------------------------- A collection of information for helpdesk

Shared memory Demo ----------------------- Demo: Two applications communicate with each other through means of a memory share (using Nomad function, 32bit only)

Universal Date Format Conversion -------- Universal date converter from your PC local date format to any format

Disable Windows DetailsPane -------------- Disable Windows Explorer Details Pane

Oracle SQL Report Generator -------------  Oracle Report generator using SQL

SQLite Report Generator -------------------  SQLite Report generator using SQL

SQLite ListView and BLOB demo ---------- Demo: shows how binary (image) objects can be recognized natively in a database BLOB field

DSN-Less Database connection demo --- Demo: ActiveX Data Objects DSN-Less Database access

Animated animals ----------------------------- Fun: Moving animated objects

Perforated image in GUI --------------------- Fun: Perforate your image with image objects

UEZ's Perforator major update ------------- Fun: Pro version of Perforator by UEZ

Visual Crop Tool (GUI) ----------------------- Easy to use Visual Image Crop tool

Visual Image effect (GUI) -------------------- Visually apply effects on an image

 

 

 

Share this post


Link to post
Share on other sites
dmob

Great stuff, will be useful for learning.

Share this post


Link to post
Share on other sites
ptrex
Valuater

@GreenCan

This can be usefull.

Thanks.

regards

ptrex

Interesting for sure!!

8)


NEWHeader1.png

Share this post


Link to post
Share on other sites
martin

Nice idea GreenCan.

I think it would be good to have an option to show the lines in a tool tip under the mouse cursor if you hovered over an item for a certain time rather than in another window.


Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script.

Share this post


Link to post
Share on other sites
Private

Nice to see that this was possible :D )

Nice idea GreenCan.

I think it would be good to have an option to show the lines in a tool tip under the mouse cursor if you hovered over an item for a certain time rather than in another window.

i agree, although the tooltip is limited by it's text.

also the baloontooltip?

Share this post


Link to post
Share on other sites
GreenCan

@All,

Thanks for your comments and remarks. I think that I included all your wishes.

Martin, yes but be aware that large text cells will be truncated in a Tooltip.

The Fly-over makes the WM_NOTIFY a bit more complex

So, why can't we display the multiline text straight away in the ListView, like a memo field or in Excel multiline data? Would be nicer no?

GreenCan

@Jamesbrooks,

Press Print Screen...

; example of pop-up or ToolTip for multiline text items in ListView
;   by GreenCan

#include <GUIConstants.au3>
#Include <GuiListView.au3>
#include <WindowsConstants.au3>
#include <EditConstants.au3>

Global $View_multiline_ToolTip = True
Global $Baloon_ToolTip = 1 ; should be 0 or 1
Global $Fly_Over = False
Global $iLastItem = -1, $iLastsubitemNR = -1
Global $hGUI_Multiline, $View_Multiline, $ColName ; Multiline cell viewer window

MsgBox(0,"Demo","Click on any cell, the cells containing multiple lines" & @CRLF & "will show a popup or ToolTip with the formatted text" & @CRLF & @CRLF & "Change '$NM_CLICK' to '$LVN_HOTTRACK'" & @CRLF & "for a fly-over effect", 10) 

$GUI = GUICreate("Listview with Pop-up for multiline cells")

$hListView = GuiCtrlCreateListView("Title 1", 10, 10, 380, 350,-1, BitOR($LVS_EX_GRIDLINES,$LVS_EX_FULLROWSELECT ))

; fill with example data
    ; Add columns
    _GUICtrlListView_AddColumn ($hListView,  "Title 2", 100)
    _GUICtrlListView_AddColumn ($hListView,  "Title 3", 150)
    
    ; Add some rows
    _GUICtrlListView_AddItem($hListView, "A1", 0)
    _GUICtrlListView_AddSubItem($hListView, 0, "A2" & @CRLF & "Example of multiline text", 1)
    _GUICtrlListView_AddSubItem($hListView, 0, "A3" & @CRLF & "Example of multiline text" & @CRLF & "3rd line", 2)

    _GUICtrlListView_AddItem($hListView, "B1", 1)
    _GUICtrlListView_AddSubItem($hListView, 1, "B2" & @CRLF & "Line 2" & @CRLF & "Line 3" & @CRLF & "Line 4", 1)
    _GUICtrlListView_AddSubItem($hListView, 1, "B3", 2)
    
    _GUICtrlListView_AddItem($hListView, "C1")
    _GUICtrlListView_AddSubItem($hListView, 2, "C2" & @CRLF & "Another multiline text", 1)
    _GUICtrlListView_AddSubItem($hListView, 2, "C3" & @CRLF & "Another Example of multiline text", 2)
; done

    ; configuration settings
    $multiline_ToolTip = GuiCtrlCreateCheckbox("Tooltip",10, 365, 70)  
    GUICtrlSetResizing(-1, $GUI_DOCKLEFT + $GUI_DOCKBOTTOM + $GUI_DOCKWIDTH + $GUI_DOCKHEIGHT)
    If $View_multiline_ToolTip = True Then 
        GuiCtrlSetState(-1, $GUI_CHECKED)
        GUICtrlSetTip($multiline_ToolTip, "Checked, Tooltip will be shown")
    Else
        GUICtrlSetTip($multiline_ToolTip, "Unchecked, Pop-Up will be shown")
    EndIf

    $Baloon_Tip = GuiCtrlCreateCheckbox("Baloon",80, 365, 70)  
    GUICtrlSetResizing(-1, $GUI_DOCKLEFT + $GUI_DOCKBOTTOM + $GUI_DOCKWIDTH + $GUI_DOCKHEIGHT)
    If $Baloon_ToolTip = 1 Then 
        GuiCtrlSetState(-1, $GUI_CHECKED)
        GUICtrlSetTip($Baloon_Tip, "Checked, Display as Balloon Tip Requires IE5+")
    Else
        GUICtrlSetTip($Baloon_Tip, "Unchecked, Normal Tooltip")
    EndIf

    $FlyOver = GuiCtrlCreateCheckbox("Fly-Over effect",150, 365, 100)  
    GUICtrlSetResizing(-1, $GUI_DOCKLEFT + $GUI_DOCKBOTTOM + $GUI_DOCKWIDTH + $GUI_DOCKHEIGHT)
    If $Fly_Over = True Then 
        GuiCtrlSetState(-1, $GUI_CHECKED)
        GUICtrlSetTip($FlyOver, "Checked, Fly-Over effect ")
    Else
        GUICtrlSetTip($FlyOver, "Unchecked, Click on Cell")
    EndIf
    
GUISetState()
GUIRegisterMsg($WM_NOTIFY, "WM_NOTIFY")

While 1
    $msg = GUIGetMsg()
    Select
    Case $msg = $GUI_EVENT_CLOSE
        ToolTip("") ; clean remaining ToolTip from WM_NOTIFY if necessary
        GUIDelete($GUI)
        Exit
        
    Case $msg = $multiline_ToolTip 
        If $View_multiline_ToolTip = True then 
            $View_multiline_ToolTip = False
            GUICtrlSetTip($multiline_ToolTip, "Unchecked, Pop-Up will be shown")
            ToolTip("") ; clean remaining ToolTip from WM_NOTIFY if necessary
        Else
            $View_multiline_ToolTip = True
            GUICtrlSetTip($multiline_ToolTip, "Checked, Tooltip will be shown")
            View_MultilineCell("") ; clean remaining Pop-up from WM_NOTIFY if necessary
        EndIf
    
    Case $msg = $Baloon_Tip 
        If $Baloon_ToolTip = 1 then 
            $Baloon_ToolTip = 0
            GUICtrlSetTip($Baloon_Tip, "Unchecked, Normal Tooltip")
        Else
            $Baloon_ToolTip = 1
            GUICtrlSetTip($Baloon_Tip, "Checked, Display as Balloon Tip Requires IE5+")
        EndIf   

    Case $msg = $FlyOver 
        If $Fly_Over = True then 
            $Fly_Over = False
            GUICtrlSetTip($FlyOver, "Unchecked, Click on Cell")
        Else
            $Fly_Over = True
            GUICtrlSetTip($FlyOver, "Checked, Fly-Over effect ")
        EndIf
        
    EndSelect
WEnd
#FUNCTION# ==============================================================
Func WM_NOTIFY($hWnd, $MsgID, $wParam, $lParam)
    Local $hWndFrom, $iIDFrom, $iCode, $tNMHDR, $hWndListView
    $hWndListView = $hListView
    If Not IsHWnd($hListView) Then $hWndListView = GUICtrlGetHandle($hListView)
    
    $tNMHDR = DllStructCreate($tagNMHDR, $lParam)
    $hWndFrom = HWnd(DllStructGetData($tNMHDR, "hWndFrom"))
    $iIDFrom = DllStructGetData($tNMHDR, "IDFrom")
    $iCode = DllStructGetData($tNMHDR, "Code")

    Switch $hWndFrom
    Case $hWndListView
        If $Fly_Over = False Then
            Switch $iCode
                Case $NM_CLICK ; when clicking on a cell that is multiline, a tooltip will display the content

                    Local $tInfo = DllStructCreate($tagNMLISTVIEW, $lParam)
                    Local $iItem = DllStructGetData($tInfo, "Item")
                    Local $subitemNR = DllStructGetData($tInfo, "SubItem")
                    $Column_attribute =_GUICtrlListView_GetColumn($hListView, $subitemNR)
                    ; if no cell change return without doing anything
                    If $iLastItem = $iItem And $iLastsubitemNR = $subitemNR Then Return 0
                    $iLastItem = $iItem
                    $iLastsubitemNR = $subitemNR
                    
                    Local $sToolTipData = _GUICtrlListView_GetItemText($hListView, $iItem,$subitemNR)
                    $Mypos = StringInStr ( $sToolTipData, @CRLF )
                    If $Mypos > 0 Then 
                        If $View_multiline_ToolTip = True Then
                            ToolTip($sToolTipData, MouseGetPos(0) + 20, MouseGetPos(1) + 20,"",0,$Baloon_ToolTip) 
                        Else
                            View_MultilineCell($sToolTipData, $Column_attribute[5] & " Row " & $iItem +1)
                        EndIf
                    Else
                        If $View_multiline_ToolTip = True Then
                            ToolTip("")
                        Else                        
                            View_MultilineCell("")
                        EndIf
                        ;ConsoleWrite("R" & $iItem & "C" & $subitemNR & " No tip" & @CR)
                    EndIf
            EndSwitch
        Else
            Switch $iCode           
                Case $Fly_Over = True And $LVN_HOTTRACK; Sent by a list-view control when the user moves the mouse over an item
                    Local $tInfo = DllStructCreate($tagNMLISTVIEW, $lParam)
                    Local $iItem = DllStructGetData($tInfo, "Item")
                    Local $subitemNR = DllStructGetData($tInfo, "SubItem")
                    $Column_attribute =_GUICtrlListView_GetColumn($hListView, $subitemNR)
                    ; if no cell change return without doing anything
                    If $iLastItem = $iItem And $iLastsubitemNR = $subitemNR Then Return 0
                    $iLastItem = $iItem
                    $iLastsubitemNR = $subitemNR
                    
                    Local $sToolTipData = _GUICtrlListView_GetItemText($hListView, $iItem,$subitemNR)
                    $Mypos = StringInStr ( $sToolTipData, @CRLF )
                    If $Mypos > 0 Then 
                        If $View_multiline_ToolTip = True Then
                            ToolTip($sToolTipData, MouseGetPos(0) + 20, MouseGetPos(1) + 20,"",0,$Baloon_ToolTip) 
                        Else
                            View_MultilineCell($sToolTipData, $Column_attribute[5] & " Row " & $iItem +1)
                        EndIf
                    Else
                        If $View_multiline_ToolTip = True Then
                            ToolTip("")
                        Else                        
                            View_MultilineCell("")
                        EndIf
                        ;ConsoleWrite("R" & $iItem & "C" & $subitemNR & " No tip" & @CR)
                    EndIf       
            EndSwitch
        EndIf   
    EndSwitch
        
    Return $GUI_RUNDEFMSG
EndFunc ;==>WM_NOTIFY
#FUNCTION# ==============================================================
Func View_MultilineCell($Cell_content,$Column_name= "")
    Local $Msg2
    
    If $Cell_content = "" Then
        ; clicked on nonmultiline cell, so close the window
        $window_open = WinList ( "Cell Content" )
        If $window_open[0][0] > 0 Then GUIDelete ( $hGUI_Multiline ) 
        Return
    Else
        $window_open = WinList ( "Cell Content" ) ; check if window already exists
        If $window_open[0][0] = 0 Then 
            ; if the window does not exist yet, create it
            Local $window_width = 300
            Local $window_heigth = 300
            $hGUI_Multiline = GUICreate("Cell Content", $window_width, $window_heigth, 1, 1, ( $WS_POPUPWINDOW), $WS_EX_TOPMOST,$GUI)
            $ColName = GUICtrlCreateLabel("Content of " & $Column_name,  10, 2, $window_width) 
            $View_Multiline = GUICtrlCreateEdit($Cell_content, 5, 20, $window_width - 10, $window_heigth - 40, BitOR($ES_AUTOVSCROLL,$ES_AUTOHSCROLL,$ES_READONLY,$ES_WANTRETURN,$WS_HSCROLL,$WS_VSCROLL))
            GUICtrlSetResizing(-1, $GUI_DOCKTOP+$GUI_DOCKBOTTOM)
            GUICtrlSetColor(-1, 0x2601D3)
            GUICtrlSetBkColor(-1, 0xEAFFE8)
            GUICtrlCreateLabel("Click on any non-multiline cell to hide this pop-up", 35, $window_heigth - 15, $window_width)   
            GUICtrlSetFont (-1, 7 , 400 )           
        Else
            ; window already exist so only change the content
            GUICtrlSetData ( $ColName, "Content of " & $Column_name ) ; column title
            GUICtrlSetData ( $View_Multiline, $Cell_content ) ; cell content
        EndIf
        GUISetState()
        Return      
            
    EndIf
EndFunc ;==>View_MultilineCell
#FUNCTION# ==============================================================
  • Like 1

Contributions

CheckUpdate - SelfUpdating script ------- Self updating script

Dynamic input validation ------------------- Use a Input masks can make your life easier and Validation can be as simple

MsgBox with CountDown ------------------- MsgBox with visual countdown

Display Multiline text cells in ListView ---- Example of pop-up or ToolTip for multiline text items in ListView

Presentation Manager ---------------------- Program to display and refresh different Border-less GUI's on a Display (large screen TV)

USB Drive Tools ------------------------------ Tool to help you with your USB drive management

Input Period udf ------------------------------ GUI for a period input

Excel ColorPicker ---------------------------- Color pickup tool will allow you to select a color from the standard Excel color palette

Excel Chart UDF ----------------------------- Collaboration project with water 

GetDateInString ------------------------------ Find date/time in a string using a date format notation like DD Mon YYYY hh:mm

TaskListAllDetailed --------------------------- List All Scheduled Tasks

Computer Info --------------------------------- A collection of information for helpdesk

Shared memory Demo ----------------------- Demo: Two applications communicate with each other through means of a memory share (using Nomad function, 32bit only)

Universal Date Format Conversion -------- Universal date converter from your PC local date format to any format

Disable Windows DetailsPane -------------- Disable Windows Explorer Details Pane

Oracle SQL Report Generator -------------  Oracle Report generator using SQL

SQLite Report Generator -------------------  SQLite Report generator using SQL

SQLite ListView and BLOB demo ---------- Demo: shows how binary (image) objects can be recognized natively in a database BLOB field

DSN-Less Database connection demo --- Demo: ActiveX Data Objects DSN-Less Database access

Animated animals ----------------------------- Fun: Moving animated objects

Perforated image in GUI --------------------- Fun: Perforate your image with image objects

UEZ's Perforator major update ------------- Fun: Pro version of Perforator by UEZ

Visual Crop Tool (GUI) ----------------------- Easy to use Visual Image Crop tool

Visual Image effect (GUI) -------------------- Visually apply effects on an image

 

 

 

Share this post


Link to post
Share on other sites
Michel Claveau

Hi!

So, why can't we display the multiline text straight away in the ListView, like a memo field or in Excel multiline data? Would be nicer no?

You have (another) way, for that:

http://www.autoitscript.com/forum/index.ph...st&p=689068

Edited by Michel Claveau

Share this post


Link to post
Share on other sites
GreenCan

Hi!

You have (another) way, for that:

http://www.autoitscript.com/forum/index.ph...st&p=689068

OK Michel,

Your grid input is a nice example of 'simulating' an editable ListView with GUICtrlCreateInput, also for controlling row heights (this is missing in ListView as far as I know) and table color effects.

But how does that relate to this topic?

Your example does not resolve the multiline cell problem, or does it? I tried to add $ES_MULTILINE in the GUICtrlCreateInput but it doesn't function.

I don't understand but I am interested to know...

By the way, in the second example I noticed following error when clicking ouside of the GUI:

\New AutoIt v3 Script (2).au3 (203) : ==> Subscript used with non-Array variable.:

If $temp[1]<$fillevertical Then

If $temp^ ERROR

Additionally, I don't like the headers scrolling away in your second example (they should stay on top of the list) and the technique is rather slow and memory hungry. This could be used for very small tables, but try this with 1500 rows, it will screw up your PC's memory.

By the way, if your goal is to make your table fully editable (as per your post of 10 april), it is possible with ListView (also for sub-items) in combination with WM_NOTIFY. There are unfortunately no good examples in the help file but take a look at the good example from Rasim: Posted by Rasim

GreenCan

Edited by GreenCan

Contributions

CheckUpdate - SelfUpdating script ------- Self updating script

Dynamic input validation ------------------- Use a Input masks can make your life easier and Validation can be as simple

MsgBox with CountDown ------------------- MsgBox with visual countdown

Display Multiline text cells in ListView ---- Example of pop-up or ToolTip for multiline text items in ListView

Presentation Manager ---------------------- Program to display and refresh different Border-less GUI's on a Display (large screen TV)

USB Drive Tools ------------------------------ Tool to help you with your USB drive management

Input Period udf ------------------------------ GUI for a period input

Excel ColorPicker ---------------------------- Color pickup tool will allow you to select a color from the standard Excel color palette

Excel Chart UDF ----------------------------- Collaboration project with water 

GetDateInString ------------------------------ Find date/time in a string using a date format notation like DD Mon YYYY hh:mm

TaskListAllDetailed --------------------------- List All Scheduled Tasks

Computer Info --------------------------------- A collection of information for helpdesk

Shared memory Demo ----------------------- Demo: Two applications communicate with each other through means of a memory share (using Nomad function, 32bit only)

Universal Date Format Conversion -------- Universal date converter from your PC local date format to any format

Disable Windows DetailsPane -------------- Disable Windows Explorer Details Pane

Oracle SQL Report Generator -------------  Oracle Report generator using SQL

SQLite Report Generator -------------------  SQLite Report generator using SQL

SQLite ListView and BLOB demo ---------- Demo: shows how binary (image) objects can be recognized natively in a database BLOB field

DSN-Less Database connection demo --- Demo: ActiveX Data Objects DSN-Less Database access

Animated animals ----------------------------- Fun: Moving animated objects

Perforated image in GUI --------------------- Fun: Perforate your image with image objects

UEZ's Perforator major update ------------- Fun: Pro version of Perforator by UEZ

Visual Crop Tool (GUI) ----------------------- Easy to use Visual Image Crop tool

Visual Image effect (GUI) -------------------- Visually apply effects on an image

 

 

 

Share this post


Link to post
Share on other sites
TheSaint

Very nice.

Thanks for sharing!


AutoIt.4.Life Clubrooms - Life is like a Donut (secret key)

Make sure brain is in gear before opening mouth!
Remember, what is not said, can be just as important as what is said.

Spoiler

What is the Secret Key? Life is like a Donut

If I put effort into communication, I expect you to read properly & fully, or just not comment.
Ignoring those who try to divert conversation with irrelevancies.
If I'm intent on insulting you or being rude, I will be obvious, not ambiguous about it.
I'm only big and bad, to those who have an over-active imagination.

I may have the Artistic Liesense ;) to disagree with you. TheSaint's Toolbox (be advised many downloads are not working due to ISP screwup with my storage)

userbar.png

Share this post


Link to post
Share on other sites
jchd

Thank you for sharing this GreenCan.

I have a question with this: I'd like to show the tip on fly-over but only for items that don't fit inside he column width. The user is invited to have the mouse fly-over because those fields have ellipsis near the column end.

I can make a multi-line text when needed, no question. But how do I detect in the notify function that a given item is currently too large to view in full?

The possibility that users change column width prevents using constants and hardcoded string length comparison.


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 here
RegExp tutorial: enough to get started
PCRE 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)

Share this post


Link to post
Share on other sites
AndreyS

So, why can't we display the multiline text straight away in the ListView, like a memo field or in Excel multiline data? Would be nicer no?

 

 
Hi GreenCan!
So after all we can or not?
 
I'm here trying to learn from the experts just: 
 
It is very necessary to me!

Share this post


Link to post
Share on other sites
EKY32

It's useful thank you very much.


[font="'trebuchet ms', helvetica, sans-serif;"]Please mark the answer of your question if you found it.[/font]

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

×