Sign in to follow this  
Followers 0
MrCreatoR

GUIListViewSysLink UDF!

18 posts in this topic

#1 ·  Posted (edited)

Hi!

This whole concept belongs to rasim, and the idea of SysLink control inside ListView belongs to ptrex! He proposed it, and i thought that this will be a good challenge/practic for me! :P

Here we go...

#cs
    Name:               GUIListViewSysLink.au3
    Description:        Functions to set Hyperlink (via SysLink control) for ListView items.
    Author:             G.Sandler (a.k.a MrCreatoR), initial concept idea by R.Gilman (a.k.a rasim), this UDF idea by ptrex!
    AutoIt version:     3.2.12.1 - 3.3.8.1
    UDF version:        1.2
#CE

Example:

#include "GUIListViewSysLink.au3"

$hGUI = GUICreate("ListView with SysLink Control!", 420, 530, -1, -1, BitOR($GUI_SS_DEFAULT_GUI, $WS_SIZEBOX))

$hListView1 = GUICtrlCreateListView("Files|Path|Links", 10, 10, 400, 240, BitOR($LVS_REPORT, $WS_BORDER, $WS_CLIPSIBLINGS))
GUICtrlCreateListViewItem("AutoIT|C:\Program Files\AutoIt3", $hListView1)
GUICtrlCreateListViewItem("Opera|C:\Program Files\Opera", $hListView1)
GUICtrlCreateListViewItem("Script|C:\MyScripts", $hListView1)

$nSysLinkBkColor = 0xC0C0C0
$nSysLinkStockObject = $LTGRAY_BRUSH

$hListView2 = GUICtrlCreateListView("Name|Links", 10, 270, 400, 240, BitOR($LVS_REPORT, $WS_BORDER, $WS_CLIPSIBLINGS))
GUICtrlCreateListViewItem("Some Name", $hListView2)

$hSysLink1  = _GUICtrlListView_SysLinkCreate($hListView1, "AutoIt Script Home Page", "http://autoitscript.com", 0, 2)
_GUICtrlListView_SysLinkSetFont(-1, "Tahoma", 9.5)

$hSysLink2  = _GUICtrlListView_SysLinkCreate($hListView1, "Opera Home Page", "http://opera.com", 1, 2)
_GUICtrlListView_SysLinkSetFont(-1, "Tahoma", 9.5)

$hSysLink3  = _GUICtrlListView_SysLinkCreate($hListView1, "My Scripts Home Page?", "http://creator-lab.ucoz.ru", 2, 2)
_GUICtrlListView_SysLinkSetFont(-1, "Tahoma", 9.5)

$hSysLink1_2  = _GUICtrlListView_SysLinkCreate($hListView2, "Some other Home Page", "http://creator-lab.ucoz.ru", 0, 1)
_GUICtrlListView_SysLinkSetFont(-1, "Arial", 10.5)

GUICtrlSetBkColor($hListView1, $nSysLinkBkColor)
GUICtrlSetBkColor($hListView2, $nSysLinkBkColor)

GUICtrlSendMsg($hListView1, $LVM_SETCOLUMNWIDTH, 0, 80)
GUICtrlSendMsg($hListView1, $LVM_SETCOLUMNWIDTH, 1, 150)
GUICtrlSendMsg($hListView1, $LVM_SETCOLUMNWIDTH, 2, 120)

GUICtrlSendMsg($hListView2, $LVM_SETCOLUMNWIDTH, 0, 230)
GUICtrlSendMsg($hListView2, $LVM_SETCOLUMNWIDTH, 1, 115)

;Here we add ID to the $hSysLink1
_GUICtrlListView_SysLinkSetLinkInfo($hSysLink1, "http://autoitscript.com", "AutoIt")

;And now we check if it was added :)
$aInfo = _GUICtrlListView_SysLinkGetLinkInfo($hSysLink1)
$sInfo = StringFormat("Info For $hSysLink1:\n\nSysLink State\t\t= %i\nURL\t\t\t= %s\nID\t\t\t= %s\nParent ListView Handle\t= %s", _
    $aInfo[1], $aInfo[2], $aInfo[3], $aInfo[4])

ConsoleWrite($sInfo)

GUISetState(@SW_SHOW, $hGUI)

While GUIGetMsg() <> $GUI_EVENT_CLOSE
WEnd

The UDF and this example attached bellow.

P.S

Feedbacks and bug reports are always welcome!

GUIListViewSysLink_1.2.zip

ListView_SysLink_1.1.zip

ListView_SysLink_1.0.zip

Test Version (with Label control):

ListView_Link_TestVersion.zip

History version:

v1.2 [13.01.2013]

* AutoIt 3.3.8.1 compatibility.

* UDF renamed to GUIListViewSysLink.au3.

* Fixed issue when clicking on link does not executed properly.

* Fixed an issue with wrong SysLink control position set after resizing.

If "Display window content when draging" is disabled in Performance options, resizing was wrong.

v1.1 [21.10.2008]

+ Added handler to activate the main window when SysLink control is focused.

This handler also set hot cursor ($OCR_NO) while user trying to drag the SysLink control.

+ Added 2 more functions:

_GUICtrlListView_SysLinkSetLinkInfo() - Sets link information.

_GUICtrlListView_SysLinkGetLinkInfo() - Gets link information.

+ Added WM_CTLCOLORSTATIC registration to set bk color for the SysLink control.

(To change the color just set $nSysLinkBkColor variable to desired color).

* Rewrited parameters for the _GUICtrlListView_SysLinkCreate() function...

* $sTextFormat splitted into different 3 parameters: $sTitle, $sLink and $iLnkID.

* Added $iFillItemText - Allows to fill item text (SysLink text),

so the LV item will have the same text as SysLink control. Default is 1.

* Fixed inactive GUI window after executing url.

v1.0 [10.10.2008]

* First release.

Enjoy! Posted Image

Edited by MrCreatoR

Using OS: Win 7 Professional, Using AutoIt Ver(s): 3.3.6.1 / 3.3.8.1

AutoIt_Rus_Community.png AutoIt Russian Community

My Work...

AutoIt_Icon_small.pngProjects: ATT - Application Translate Tool {new}| BlockIt - Block files & folders {new}| SIP - Selected Image Preview {new}| SISCABMAN - SciTE Abbreviations Manager {new}| AutoIt Path Switcher | AutoIt Menu for Opera! | YouTube Download Center! | Desktop Icons Restorator | Math Tasks | KeyBoard & Mouse Cleaner | CaptureIt - Capture Images Utility | CheckFileSize Program

AutoIt_Icon_small.pngUDFs: OnAutoItErrorRegister - Handle AutoIt critical errors {new}| AutoIt Syntax Highlight {new}| Opera Library! | Winamp Library | GetFolderToMenu | Custom_InputBox()! | _FileRun UDF | _CheckInput() UDF | _GUIInputSetOnlyNumbers() UDF | _FileGetValidName() UDF | _GUICtrlCreateRadioCBox UDF | _GuiCreateGrid() | _PathSplitByRegExp() | _GUICtrlListView_MoveItems - UDF | GUICtrlSetOnHover_UDF! | _ControlTab UDF! | _MouseSetOnEvent() UDF! | _ProcessListEx - UDF | GUICtrl_SetResizing - UDF! | Mod. for _IniString UDFs | _StringStripChars UDF | _ColorIsDarkShade UDF | _ColorConvertValue UDF | _GUICtrlTab_CoverBackground | CUI_App_UDF | _IncludeScripts UDF | _AutoIt3ExecuteCode | _DragList UDF | Mod. for _ListView_Progress | _ListView_SysLink | _GenerateRandomNumbers | _BlockInputEx | _IsPressedEx | OnAutoItExit Handler | _GUICtrlCreateTFLabel UDF | WinControlSetEvent UDF | Mod. for _DirGetSizeEx UDF
 
AutoIt_Icon_small.pngExamples: 
ScreenSaver Demo - Matrix included | Gui Drag Without pause the script | _WinAttach()! | Turn Off/On Monitor | ComboBox Handler Example | Mod. for "Thinking Box" | Cool "About" Box | TasksBar Imitation Demo

Like the Projects/UDFs/Examples? Please rate the topic (up-right corner of the post header: Rating AutoIt_Rating.gif)

* === My topics === *

==================================================
My_Userbar.gif
==================================================

AutoIt is simple, subtle, elegant. © AutoIt Team

Share this post


Link to post
Share on other sites



MrCreatoR

Good work. Thank you! :P

Share this post


Link to post
Share on other sites

Very Nice! Thanks!

Share this post


Link to post
Share on other sites

Good work here... a suggestion I'd make is to get the back ground color of the listview and paint the background color of the CreateWindowEx the same :(... You two seem to feed of each other well :P .


[center]Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.[/center]

Share this post


Link to post
Share on other sites

@SmOke_N

I am just kicking the ball, it is MrCreatoR and ProgAndy who is scoring here !! :P

Anyhow this is a very nice addition to the standard listView.

Regards,

ptrex

I was speaking of Rasim :( ... Both have produced some nice Listview alternatives/options. That's who I was referring to by feeding well off of one another (I mistyped in my other post, I put "Feed of" rather than "Feed off").

[center]Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.[/center]

Share this post


Link to post
Share on other sites

#8 ·  Posted (edited)

Thanks for the feedbacks!

@SmOke_N

a suggestion I'd make is to get the back ground color of the listview and paint the background color of the CreateWindowEx the same

Actualy i tried that, i spent on this issue more time than on building the UDF itself :(

How to set background color for window created with _WinAPI_CreateWindowEx() ?

And what is the best way to get Background color of ListView control?

This one not working:

$hDC = DllCall("User32.dll", "hwnd", "GetDC", "hwnd", $hLV)
$hDC = $hDC[0]

$nColor = DllCall("GDI32.dll", "int", "GetBkColor", "hwnd", $hDC)

It returns FFFFFF (white) always :P

Edited by MrCreatoR

Using OS: Win 7 Professional, Using AutoIt Ver(s): 3.3.6.1 / 3.3.8.1

AutoIt_Rus_Community.png AutoIt Russian Community

My Work...

AutoIt_Icon_small.pngProjects: ATT - Application Translate Tool {new}| BlockIt - Block files & folders {new}| SIP - Selected Image Preview {new}| SISCABMAN - SciTE Abbreviations Manager {new}| AutoIt Path Switcher | AutoIt Menu for Opera! | YouTube Download Center! | Desktop Icons Restorator | Math Tasks | KeyBoard & Mouse Cleaner | CaptureIt - Capture Images Utility | CheckFileSize Program

AutoIt_Icon_small.pngUDFs: OnAutoItErrorRegister - Handle AutoIt critical errors {new}| AutoIt Syntax Highlight {new}| Opera Library! | Winamp Library | GetFolderToMenu | Custom_InputBox()! | _FileRun UDF | _CheckInput() UDF | _GUIInputSetOnlyNumbers() UDF | _FileGetValidName() UDF | _GUICtrlCreateRadioCBox UDF | _GuiCreateGrid() | _PathSplitByRegExp() | _GUICtrlListView_MoveItems - UDF | GUICtrlSetOnHover_UDF! | _ControlTab UDF! | _MouseSetOnEvent() UDF! | _ProcessListEx - UDF | GUICtrl_SetResizing - UDF! | Mod. for _IniString UDFs | _StringStripChars UDF | _ColorIsDarkShade UDF | _ColorConvertValue UDF | _GUICtrlTab_CoverBackground | CUI_App_UDF | _IncludeScripts UDF | _AutoIt3ExecuteCode | _DragList UDF | Mod. for _ListView_Progress | _ListView_SysLink | _GenerateRandomNumbers | _BlockInputEx | _IsPressedEx | OnAutoItExit Handler | _GUICtrlCreateTFLabel UDF | WinControlSetEvent UDF | Mod. for _DirGetSizeEx UDF
 
AutoIt_Icon_small.pngExamples: 
ScreenSaver Demo - Matrix included | Gui Drag Without pause the script | _WinAttach()! | Turn Off/On Monitor | ComboBox Handler Example | Mod. for "Thinking Box" | Cool "About" Box | TasksBar Imitation Demo

Like the Projects/UDFs/Examples? Please rate the topic (up-right corner of the post header: Rating AutoIt_Rating.gif)

* === My topics === *

==================================================
My_Userbar.gif
==================================================

AutoIt is simple, subtle, elegant. © AutoIt Team

Share this post


Link to post
Share on other sites

For setting the bg color, experiment with the WM_CTLCOLOR* messages. I don't know which one, if any, that a syslink control sends though. Here's the msdn -

http://msdn.microsoft.com/en-us/library/bb432504(VS.85).aspx

I don't see a call on 32 bit system for SysLink control ...

Thanks for the feedbacks!

@SmOke_N

Actualy i tried that, i spent on this issue more time than on building the UDF itself :(

How to set background color for window created with _WinAPI_CreateWindowEx() ?

And what is the best way to get Background color of ListView control?

This one not working:

$hDC = DllCall("User32.dll", "hwnd", "GetDC", "hwnd", $hLV)
$hDC = $hDC[0]

$nColor = DllCall("GDI32.dll", "int", "GetBkColor", "hwnd", $hDC)

It returns FFFFFF (white) always :P

This is a similar issue I had here: http://www.autoitscript.com/forum/index.php?showtopic=65802

I reformatted it a bit using wraithdu's and googles suggestion: http://cboard.cprogramming.com/archive/ind...hp/t-91110.html :

Func _GUISetSysLinkBkColor($h_parent, $h_wnd, $i_color = 0xFFFFFF)
    Local Const $GCL__HBRBACKGROUND  = -10
    Local Const $RDW__ERASE          = 0x04
    Local Const $RDW__INVALIDATE        = 0x01
    Local Const $RDW__ALLCHILDREN      = 0x080
    Local Const $RDW__UPDATENOW      = 0x100
    Local Const $WM__CTLCOLORSTATIC  = 0x00138

    Local $i_color_bgr = _
                        BitOR(BitShift(BitAND($i_color, 0x000000FF), 16), _
                        BitAND($i_color, 0x0000FF00), _
                        BitShift(BitAND($i_color, 0x00FF0000),16))
                        
    Local $h_dc = DllCall("User32.dll", "hwnd", "GetDC", "hwnd", $hSysLink1)
    If @error Then Return SetError(1, 0, 0)
    
    Local $h_sm = DllCall("User32.dll", "hwnd", "SendMessage", "hwnd", $h_parent, "uint", $WM__CTLCOLORSTATIC, "wparam", $h_dc[0], "lparam", $h_wnd)
    If @error Then Return SetError(2, 0, 0)
    
    Local $i_scl = DllCall("User32.dll", "int", "SetClassLongA", "hwnd", $h_wnd, "int", $GCL__HBRBACKGROUND, "dword", $h_sm[0])
    If @error Then Return SetError(3, 0, 0)
    
    DllCall("User32.dll", "int", "DeleteObject", "long", $i_scl[0])
    DllCall("User32.dll", "int", "InvalidateRect", "hwnd", $h_wnd, "int", 0, "int", 1)
    DllCall("User32.dll", "int", "RedrawWindow", "hwnd", $h_wnd, "int", 0, "int", 0, "uint", _
                BitOR($RDW__ERASE, $RDW__INVALIDATE, $RDW__ALLCHILDREN, $RDW__UPDATENOW))
    DllCall("User32.dll", "int", "UpdateWindow", "hwnd", $h_wnd)
    DllCall("User32.dll", "int", "ReleaseDC", "hwnd", $h_wnd, "hwnd", $h_dc[0])
    Return 1
EndFunc
But still the same issue :idea: ... I'll be curious to see this be accomplished for more than one reason obviously :) ...

[center]Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.[/center]

Share this post


Link to post
Share on other sites

I spent 2 more hours (or maybe more) on this, this function has suffered a lot from me :P But no luck either :)

In the end(?) i came up with two workarounds:

1) Change the background color of ListView control :( - Not so preferable.

2) Instead of SysLink control use standard labels on top of new GUI (as framework), and handle the clicks with some timer function.

For the first one just add this to the top of _GUICtrlListView_SysLinkCreate function:

Local $nBkColor = _WinAPI_GetSysColor($COLOR_3DFACE)
    GUICtrlSetBkColor($hWnd, $nBkColor)

(before «If Not IsHWnd($hWnd) Then $hWnd = GUICtrlGetHandle($hWnd)»).

About the second one, later i will post test-version (to see if it's good enough :idea: ).


Using OS: Win 7 Professional, Using AutoIt Ver(s): 3.3.6.1 / 3.3.8.1

AutoIt_Rus_Community.png AutoIt Russian Community

My Work...

AutoIt_Icon_small.pngProjects: ATT - Application Translate Tool {new}| BlockIt - Block files & folders {new}| SIP - Selected Image Preview {new}| SISCABMAN - SciTE Abbreviations Manager {new}| AutoIt Path Switcher | AutoIt Menu for Opera! | YouTube Download Center! | Desktop Icons Restorator | Math Tasks | KeyBoard & Mouse Cleaner | CaptureIt - Capture Images Utility | CheckFileSize Program

AutoIt_Icon_small.pngUDFs: OnAutoItErrorRegister - Handle AutoIt critical errors {new}| AutoIt Syntax Highlight {new}| Opera Library! | Winamp Library | GetFolderToMenu | Custom_InputBox()! | _FileRun UDF | _CheckInput() UDF | _GUIInputSetOnlyNumbers() UDF | _FileGetValidName() UDF | _GUICtrlCreateRadioCBox UDF | _GuiCreateGrid() | _PathSplitByRegExp() | _GUICtrlListView_MoveItems - UDF | GUICtrlSetOnHover_UDF! | _ControlTab UDF! | _MouseSetOnEvent() UDF! | _ProcessListEx - UDF | GUICtrl_SetResizing - UDF! | Mod. for _IniString UDFs | _StringStripChars UDF | _ColorIsDarkShade UDF | _ColorConvertValue UDF | _GUICtrlTab_CoverBackground | CUI_App_UDF | _IncludeScripts UDF | _AutoIt3ExecuteCode | _DragList UDF | Mod. for _ListView_Progress | _ListView_SysLink | _GenerateRandomNumbers | _BlockInputEx | _IsPressedEx | OnAutoItExit Handler | _GUICtrlCreateTFLabel UDF | WinControlSetEvent UDF | Mod. for _DirGetSizeEx UDF
 
AutoIt_Icon_small.pngExamples: 
ScreenSaver Demo - Matrix included | Gui Drag Without pause the script | _WinAttach()! | Turn Off/On Monitor | ComboBox Handler Example | Mod. for "Thinking Box" | Cool "About" Box | TasksBar Imitation Demo

Like the Projects/UDFs/Examples? Please rate the topic (up-right corner of the post header: Rating AutoIt_Rating.gif)

* === My topics === *

==================================================
My_Userbar.gif
==================================================

AutoIt is simple, subtle, elegant. © AutoIt Team

Share this post


Link to post
Share on other sites

UDF updated!

History:

; v1.0 [10.10.2008, 02:20]

; First release.

;

; v1.1 [21.10.2008, 00:03]

; - Added handler to activate the main window when SysLink control is focused.

; This handler also set hot cursor ($OCR_NO) while user trying to drag the SysLink control.

;

; - Added 2 more functions:

; _GUICtrlListView_SysLinkSetLinkInfo() - Sets link information.

; _GUICtrlListView_SysLinkGetLinkInfo() - Gets link information.

;

; - Added WM_CTLCOLORSTATIC registration to set bk color for the SysLink control.

; (To change the color just set $nSysLinkBkColor variable to desired color).

;

; - Rewrited parameters for the _GUICtrlListView_SysLinkCreate() function...

; * $sTextFormat splitted into different 3 parameters: $sTitle, $sLink and $iLnkID.

; * Added $iFillItemText - Allows to fill item text (SysLink text),

; so the LV item will have the same text as SysLink control. Default is 1.

;

; - Fixed inactive GUI window after executing url.

I also added mentioned before Test version (with Label control), please see first post.

Using OS: Win 7 Professional, Using AutoIt Ver(s): 3.3.6.1 / 3.3.8.1

AutoIt_Rus_Community.png AutoIt Russian Community

My Work...

AutoIt_Icon_small.pngProjects: ATT - Application Translate Tool {new}| BlockIt - Block files & folders {new}| SIP - Selected Image Preview {new}| SISCABMAN - SciTE Abbreviations Manager {new}| AutoIt Path Switcher | AutoIt Menu for Opera! | YouTube Download Center! | Desktop Icons Restorator | Math Tasks | KeyBoard & Mouse Cleaner | CaptureIt - Capture Images Utility | CheckFileSize Program

AutoIt_Icon_small.pngUDFs: OnAutoItErrorRegister - Handle AutoIt critical errors {new}| AutoIt Syntax Highlight {new}| Opera Library! | Winamp Library | GetFolderToMenu | Custom_InputBox()! | _FileRun UDF | _CheckInput() UDF | _GUIInputSetOnlyNumbers() UDF | _FileGetValidName() UDF | _GUICtrlCreateRadioCBox UDF | _GuiCreateGrid() | _PathSplitByRegExp() | _GUICtrlListView_MoveItems - UDF | GUICtrlSetOnHover_UDF! | _ControlTab UDF! | _MouseSetOnEvent() UDF! | _ProcessListEx - UDF | GUICtrl_SetResizing - UDF! | Mod. for _IniString UDFs | _StringStripChars UDF | _ColorIsDarkShade UDF | _ColorConvertValue UDF | _GUICtrlTab_CoverBackground | CUI_App_UDF | _IncludeScripts UDF | _AutoIt3ExecuteCode | _DragList UDF | Mod. for _ListView_Progress | _ListView_SysLink | _GenerateRandomNumbers | _BlockInputEx | _IsPressedEx | OnAutoItExit Handler | _GUICtrlCreateTFLabel UDF | WinControlSetEvent UDF | Mod. for _DirGetSizeEx UDF
 
AutoIt_Icon_small.pngExamples: 
ScreenSaver Demo - Matrix included | Gui Drag Without pause the script | _WinAttach()! | Turn Off/On Monitor | ComboBox Handler Example | Mod. for "Thinking Box" | Cool "About" Box | TasksBar Imitation Demo

Like the Projects/UDFs/Examples? Please rate the topic (up-right corner of the post header: Rating AutoIt_Rating.gif)

* === My topics === *

==================================================
My_Userbar.gif
==================================================

AutoIt is simple, subtle, elegant. © AutoIt Team

Share this post


Link to post
Share on other sites

hummm getting in 3.3.6.1 an error message :unsure:

C:\Program Files\AutoIt3\Include\_ListView_SysLink.au3(59,31) : ERROR: $HDN_FIRST previously declared as a 'Const'

Global Const $HDN_FIRST = -300

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^

C:\~\test3.au3 - 1 error(s), 0 warning(s)

maybe u can do something whit it :>

i don't ;)


as finishing touch god created the dutch

Share this post


Link to post
Share on other sites

#14 ·  Posted (edited)

Delete the line with the error message, it's already been declared in one of the other included files, HeaderConstants.au3 in this case.

EDIT:typo

Edited by BrewManNH

If I posted any code, assume that code was written using the latest release version unless stated otherwise. Also, if it doesn't work on XP I can't help with that because I don't have access to XP, and I'm not going to.
Give a programmer the correct code and he can do his work for a day. Teach a programmer to debug and he can do his work for a lifetime - by Chirag Gude
How to ask questions the smart way!

I hereby grant any person the right to use any code I post, that I am the original author of, on the autoitscript.com forums, unless I've specifically stated otherwise in the code or the thread post. If you do use my code all I ask, as a courtesy, is to make note of where you got it from.

Back up and restore Windows user files _Array.au3 - Modified array functions that include support for 2D arrays.  -  ColorChooser - An add-on for SciTE that pops up a color dialog so you can select and paste a color code into a script.  -  Customizable Splashscreen GUI w/Progress Bar - Create a custom "splash screen" GUI with a progress bar and custom label.  -  _FileGetProperty - Retrieve the properties of a file  -  SciTE Toolbar - A toolbar demo for use with the SciTE editor  -  GUIRegisterMsg demo - Demo script to show how to use the Windows messages to interact with controls and your GUI.  -   Latin Square password generator

Share this post


Link to post
Share on other sites

This is awesome and it helped me to create a link for my tool... but if i click on the link nothing happens how to make work ?


Thank you,Regards,[font="Garamond"][size="4"]K.Syed Ibrahim.[/size][/font]

Share this post


Link to post
Share on other sites

Update (after 4 years! :lmao: ):

v1.2 [13.01.2013]

* AutoIt 3.3.8.1 compatibility.

* UDF renamed to GUIListViewSysLink.au3.

* Fixed issue when clicking on link does not executed properly.

* Fixed an issue with wrong SysLink control position set after resizing.

If "Display window content when draging" is disabled in Performance options, resizing was wrong.


Using OS: Win 7 Professional, Using AutoIt Ver(s): 3.3.6.1 / 3.3.8.1

AutoIt_Rus_Community.png AutoIt Russian Community

My Work...

AutoIt_Icon_small.pngProjects: ATT - Application Translate Tool {new}| BlockIt - Block files & folders {new}| SIP - Selected Image Preview {new}| SISCABMAN - SciTE Abbreviations Manager {new}| AutoIt Path Switcher | AutoIt Menu for Opera! | YouTube Download Center! | Desktop Icons Restorator | Math Tasks | KeyBoard & Mouse Cleaner | CaptureIt - Capture Images Utility | CheckFileSize Program

AutoIt_Icon_small.pngUDFs: OnAutoItErrorRegister - Handle AutoIt critical errors {new}| AutoIt Syntax Highlight {new}| Opera Library! | Winamp Library | GetFolderToMenu | Custom_InputBox()! | _FileRun UDF | _CheckInput() UDF | _GUIInputSetOnlyNumbers() UDF | _FileGetValidName() UDF | _GUICtrlCreateRadioCBox UDF | _GuiCreateGrid() | _PathSplitByRegExp() | _GUICtrlListView_MoveItems - UDF | GUICtrlSetOnHover_UDF! | _ControlTab UDF! | _MouseSetOnEvent() UDF! | _ProcessListEx - UDF | GUICtrl_SetResizing - UDF! | Mod. for _IniString UDFs | _StringStripChars UDF | _ColorIsDarkShade UDF | _ColorConvertValue UDF | _GUICtrlTab_CoverBackground | CUI_App_UDF | _IncludeScripts UDF | _AutoIt3ExecuteCode | _DragList UDF | Mod. for _ListView_Progress | _ListView_SysLink | _GenerateRandomNumbers | _BlockInputEx | _IsPressedEx | OnAutoItExit Handler | _GUICtrlCreateTFLabel UDF | WinControlSetEvent UDF | Mod. for _DirGetSizeEx UDF
 
AutoIt_Icon_small.pngExamples: 
ScreenSaver Demo - Matrix included | Gui Drag Without pause the script | _WinAttach()! | Turn Off/On Monitor | ComboBox Handler Example | Mod. for "Thinking Box" | Cool "About" Box | TasksBar Imitation Demo

Like the Projects/UDFs/Examples? Please rate the topic (up-right corner of the post header: Rating AutoIt_Rating.gif)

* === My topics === *

==================================================
My_Userbar.gif
==================================================

AutoIt is simple, subtle, elegant. © AutoIt Team

Share this post


Link to post
Share on other sites

Hello MrCreatoR,

I recently found your solution for the hyperlinks for listviews and found it really helpfull. I almost got my Autoit applicaton running however stumbled over a problem I have difficulties to resolve. It might be quite trivial for you and hopefully you can help. I am using your GUIListViewSysLink code to actually show hyperlinks in a listview which have prior been extracted from a text file. Hence the string containing the address (in my case it will be a file path) will need to be stored assigned to a variabel first and then will need to be handed over to your function. Here is the line of code where the problem starts:

...

_GUICtrlListView_SysLinkCreate($listview, "Update", $link, $i-1, 4)

...

Here the $link variable contains a simple string such as "C:tempupdate.bat". and it really needs to be a variable to allow changing hyperlinks. When executing my code I don't get a hyperlink in the corresponding column but rather something like:
<a href="C:tempupdate.bat""

I might have forgotton some other parameters. Could you help me out here? I hope the info I provided is sufficient.

Would really appreciate your help.

Regards,

hudehade

Share this post


Link to post
Share on other sites

When executing my code I don't get a hyperlink in the corresponding column but rather something like:

<a href="C:tempupdate.bat""

 

Hi,

I have tested the issue with variable, and it's working fine:

$sLink = 'c:\test.txt'
$hSysLink  = _GUICtrlListView_SysLinkCreate($hListView, "Update", $sLink, 0, 1)

Perhaps something wrong with the index values, can you show me the full code? Or a part with the ListView and UDF called in a loop?


Using OS: Win 7 Professional, Using AutoIt Ver(s): 3.3.6.1 / 3.3.8.1

AutoIt_Rus_Community.png AutoIt Russian Community

My Work...

AutoIt_Icon_small.pngProjects: ATT - Application Translate Tool {new}| BlockIt - Block files & folders {new}| SIP - Selected Image Preview {new}| SISCABMAN - SciTE Abbreviations Manager {new}| AutoIt Path Switcher | AutoIt Menu for Opera! | YouTube Download Center! | Desktop Icons Restorator | Math Tasks | KeyBoard & Mouse Cleaner | CaptureIt - Capture Images Utility | CheckFileSize Program

AutoIt_Icon_small.pngUDFs: OnAutoItErrorRegister - Handle AutoIt critical errors {new}| AutoIt Syntax Highlight {new}| Opera Library! | Winamp Library | GetFolderToMenu | Custom_InputBox()! | _FileRun UDF | _CheckInput() UDF | _GUIInputSetOnlyNumbers() UDF | _FileGetValidName() UDF | _GUICtrlCreateRadioCBox UDF | _GuiCreateGrid() | _PathSplitByRegExp() | _GUICtrlListView_MoveItems - UDF | GUICtrlSetOnHover_UDF! | _ControlTab UDF! | _MouseSetOnEvent() UDF! | _ProcessListEx - UDF | GUICtrl_SetResizing - UDF! | Mod. for _IniString UDFs | _StringStripChars UDF | _ColorIsDarkShade UDF | _ColorConvertValue UDF | _GUICtrlTab_CoverBackground | CUI_App_UDF | _IncludeScripts UDF | _AutoIt3ExecuteCode | _DragList UDF | Mod. for _ListView_Progress | _ListView_SysLink | _GenerateRandomNumbers | _BlockInputEx | _IsPressedEx | OnAutoItExit Handler | _GUICtrlCreateTFLabel UDF | WinControlSetEvent UDF | Mod. for _DirGetSizeEx UDF
 
AutoIt_Icon_small.pngExamples: 
ScreenSaver Demo - Matrix included | Gui Drag Without pause the script | _WinAttach()! | Turn Off/On Monitor | ComboBox Handler Example | Mod. for "Thinking Box" | Cool "About" Box | TasksBar Imitation Demo

Like the Projects/UDFs/Examples? Please rate the topic (up-right corner of the post header: Rating AutoIt_Rating.gif)

* === My topics === *

==================================================
My_Userbar.gif
==================================================

AutoIt is simple, subtle, elegant. © AutoIt Team

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
Sign in to follow this  
Followers 0

  • Similar Content

    • rcmaehl
      IRC UDF - Updated Version of Chips' IRC UDF
      By rcmaehl
      A UDF to connect to IRC using TCP Functions, as well as perform actions once connected.
      SURVEY: What data would you like to see returned on success?

      Notes:
      Originally created by Chip.
      UDF Headers updated compared to old script.
      Error and Parameter Handling updated compared to old script.
      If you need to bypass the RFC compliance of this UDF, use _IRCRaw.
      The majority of the old functions have been modified. It will break most, if not all, scripts using the old UDF.
      These commands should work on every server following either RFC 1459 (legacy) or RFC 2812 (preferred).


      Functions:
      _IRCChannelInvite
      _IRCChannelJoin
      _IRCChannelKick
      _IRCChannelPart
      _IRCChannelTopic
      _IRCConnect
      _IRCDisconnect
      _IRCGetMsg
      _IRCMultiMode
      _IRCMultiSendMsg
      _IRCRaw
      _IRCSelfOper
      _IRCSelfSetNick
      _IRCSelfSetStatus
      _IRCServerPing
      _IRCServerPong
      _IRCServerTime
      _IRCServerVersion
       
      Extra Functions:
      _IRCReplyTo (IRCExtras.au3)
      _IRCStripSpecial (IRCExtras.au3)
       
      Downloads:
      Additional Links:
      Old UDF Topic:
       
      DISCLAIMER: While these downloads are more stable than the ones above, I do not have time to thoroughly test all functions and variable entries. If something doesn't work as expected or gives you an error please check @error and @extended variables then create a reply to this topic.

      Changelog:
      07/21/2016: Example.au3 Fixed : Includes Example.au3 Renamed: IRC_Example.au3 IRC.au3 Changed: Minor Performance Improvements 04/18/2016: IRCConstants.au3 Updated: A Ton of New Constants added IRCMultiSendMsg Added : Color Example Increased TCP Timeout in all Examples 04/13/2016: CUI.au3 Updated: Errors now output to Error Stream in Console (C/G)UI.au3 Fixed : Userlists (FOR REAL THIS TIME) by being sure to get the current channel Removed: Duplicate Constants File Include Removed: Local Declaration inside of While loop for Performance Updated: TCPTimeout Increased Updated: $sTemp renamed $sStrip for Readibility Example.au3 Updated: TCPTimeout Increased GUI_Client.au3 Renamed: GUI.au3 _IRCStripSpecial Added : Parameter Checking Updated: Documentation _IRCMultiSendMsg Added : Additional flags for Message Type (POSSIBLY SCRIPT BREAKING if using $_bTrim!) Updated: Example to show new flags Updated: Increase Max Message Size from 368 To 436 04/09/2016: IRC.au3 Updated: All Documentation Added : Now has a Constaznts file _IRCConnnect Fixed : Now PROPERLY returns any errors _IRCGetMsg Removed: $_iChars parameter since it gets one packet at a time and parsing is easier _IRCReplyTo Fixed : Now properly returns username _IRCStripSpecial Added : Now uses Constants File All files are now in a single ZIP Includes 2 basic IRC "clients", a CUI, and a GUI 07/15/2015: Example.au3 Added : Improved Debugging   Updated: All Space Indents to Tab Idents   IRC.au3 Removed: Exception skipping @error = -1 in IRCGetMsg() as 3.3.14.0 fixed it 07/15/2015: Example.au3 Added : Ping Timeout Fixed : Userlist clipping of last user IRC.au3 Fixed : IRCGetMsg() Hang 07/08/2015: Example.au3 Fixed : User Lists   Fixed : Nickname now switches to backup nickname if first choice is already in use IRC.au3 Added : UDF Index Added : #include-once Updated: All Functions updated to Single Entry, Single Exit Updated: Now passes Au3Check on -q -d -w 1 -w 2 -w 3 -w- 4 -w 5 -w 6 -w- 7 01/15/2015: Example.au3 Fixed : Ampersand channels causing a crash 12/20/2014: Example.au3 Fixed : Nicks not updating on all channel lists when a user changed their nick Fixed : Nicks not deleting on all channel lists when a user quits the network 12/19/2014: Example.au3 Added : User lists Added : Channel lists Added : Bot keeps track of own nick Added : Secondary nick in case first nick choice is in use. Added : Extremely Minor performance improvements _IRCConnect Added : Improved parameter checking _IRCGetMsg Updated: Now only retrieves one packet by default (MAY be script breaking) 10/14/2014: Example.au3 Added : Shutdown TCP on exit Fixed : $Recipient now gets the actual Recipient instead of the 3rd message Added : Now exits when told to quit. IRC.au3 Added : Improved Error Reporting (Includes @extended on error) _IRCDisconnect Added : Close Socket on Disconnect _IRCStripSpecial Added : Improved Color Stripping 09/28/2014: _IRCConnect Fixed : Checking if Mode was blank. _IRCGetMsg Fixed : Spamming of 0 and incorrectly thinking there was an error. 09/28/2014: IRC.au3 Fixed : All functions now return when errors are encountered instead of continuing _IRCConnect Added : Now returns an error if optional password failed to send _IRCGetMsg Added : Now returns an error if it failed to receive a custom amount of data _IRCServerVersion Fixed : Capitalized "Version" 09/26/2014: Example.au3 Fixed : Pings not ending with @CRLF IRCExtras.au3 Added : _IRCStripSpecial(), Cleans special characters sometimes seen in IRC 09/24/2014: Example.au3 Added : Checking for PrivMsg Fixed : Infinite loop if you removed _IRCDisconnect Updated: Bot now disconnects when receiving "!quit" instead of automatically Discontinuted BETA UDF project. 04/20/2014: IRCExtras.au3 Added : Additional IRC Functions _IRChangeNick Renamed: _IRCSelfSetNick (SCRIPT BREAKING! Fix: Replace _IRCChangeNick with _IRCSelfSetNick) _IRCGetMsg Fixed : Now no longer Splits Packets if Default option is used _IRCChannelInvite Added : Invites a User to a Channel _IRCChannelKick Added : Kick a User from a channel _IRCJoinChannel Renamed: _IRCChannelJoin (SCRIPT BREAKING! Fix: Replace _IRCJoinChannel with _IRCChannelJoin) _IRCMode Renamed: _IRCMultiMode (SCRIPT BREAKING! Fix: Replace _IRCMode with _IRCMultiMode) _IRCOper Renamed: _IRCSelfOper (SCRIPT BREAKING! Fix: Replace _IRCOper with _IRCSelfOper) _IRCPartChannel Renamed: _IRCChannelPart (SCRIPT BREAKING! Fix: Replace _IRCPartChannel with _IRCChannelPart) _IRCPing Renamed: _IRCServerPing (SCRIPT BREAKING! Fix: Replace _IRCPing with _IRCServerPing) _IRCPong Renamed: _IRCServerPong (SCRIPT BREAKING! Fix: Replace _IRCPong with _IRCServerPong) _IRCSelfSetStatus Added : Sets you AFK and un-AFK _IRCSendMessage Renamed: Renamed _IRCMultiSendMsg. (SCRIPT BREAKING Fix: Replace IRCSendMessage with IRCMultiSendMsg) _IRCSendMessageRaw Renamed: Renamed _IRCRaw (SCRIPT BREAKING! Fix: Replace _IRCSendMessageRaw with _IRCRaw) _IRCServerTime Added : Get time from a Server _IRCServerVersion Added : Get Software Version from a Server _IRCTopic Renamed: _IRCChannelTopic (SCRIPT BREAKING! Fix: Replace _IRCTopic with _IRCChannelTopic) Improved Parameter detection in all Functions Renamed Functions to show who/what they effect, MASSIVE Script Breaking. Sorry! :/ 04/06/2014: _IRCGetMsg Added : Use to get IRC Messages. _IRCSetTopic Changed: Now named _IRCTopic (SCRIPT BREAKING! Fix: Replace _IRCSetTopic with _IRCTopic) Changed: Can now be used to query topic and does so by default. Use "" to blank the topic All functions now thoroughly check their parameters Updated all functions to use @extended to some errors Fixed @error returning 0 by starting all errors at 1 instead of 0 03/20/2014: _IRCChangeMode Changed: Now named _IRCMode (SCRIPT BREAKING! Fix: Replace _IRCChangeMode with _IRCMode) Changed: $_sMode is now OPTIONAL. Allowing the command to be used to Query current mode as well _IRCConnect Fixed : Missing Colon Before $_sRealName. It should now allow Real Names with spaces _IRCDisconnect Fixed : Issue with Blank Messages. Should now properly blank to Default _IRCPing Changed: $_Server is now REQUIRED. (SCRIPT BREAKING! Fix: Specify a server as Parameter 2) _IRCSendMessage Added : $_bTrim, Trims message if too long instead of breaking up the message, Default is true _IRCSetTopic Added : Command for setting a Channel Topic Updated Most Functions to include better error checking Updated Most Channel Related Functions to check for valid channels 03/16/2014: _IRCChangeMode Added : Optional parameters for channel modes Changed: Parameter ordering Target is now before Mode (SCRIPT BREAKING! Fix: Swap Parameters 2 and 3) _IRCConnect Changed: No longer exits the script on error, instead returns TCPConnect Error Code _IRCJoinChannel Added : Now Supports Channel Passwords _IRCOper Added : Command for IRC Server Operator Login Updated All Functions to have UDF standard error codes 02/24/2014: _IRCSendMessage Changed: Split Into _IRCSendMessage and _IRCSendMessageRaw (SCRIPT BREAKING! No Simple Fix Available) 02/23/2014: Made variables comply to UDF Standards http://www.autoitscript.com/autoit3/udfs/UDF_Standards.htm Removed MsgBoxes left over from old UDF Updated / Uploaded IRC.au3 Known and Reported Bugs:
      Message output only displays ANSI characters in CUI. (Can't Fix) Freenode requires registration for part messages thus the part message in example doesn't show up (Can't fix) Messages (e.g. PRIVMSG) are not forwarded?, when it contains umlauts/german mutations and when the message only contains a dot '.' (Unconfirmed) Warnings:
      Do NOT send a lot of messages at once. MOST networks will disconnect you. SOME networks will permanently ban you. A MINORITY will harshly retailiate. Do NOT use the Sleep() function in your scripts. It prevents you from receiving any new data, can disconnect your from the network, and have other undesired consequences. Use the TimerInit() and TimerDiff() functions and possibly a message queue. To Do:
      Possibly add in SSL functionality Create More Functions for IRC commands An entire IRC daemon written in AutoIt Have _IRCChannelJoin check the channel list for errors Have _IRCChannelPart check the channel list for errors Possibly Include Kips TCP UDF for ASync Port Listening in Example Create Additional UDFs for extras such as CTCP, DCC, and Error Lookup Experiment with having functions check for the reply and see if reliable. Have _IRCMultiMode Check if User or Channel and Accept or Deny $_sParams Accordingly Upcoming Changes:
      TBD
    • Trolleule
      Show ToolTip when hovering over listview group
      By Trolleule
      Hi,
      i want to display a tooltip when i hover over the listview group. It sounds not difficult but i couldn't find a solution and i searched for autoit as well as for c# :/
      So i came up with a not so pretty solution:
      #include <GUIConstantsEx.au3> #include <GuiImageList.au3> #include <GuiListView.au3> #include <WindowsConstants.au3> #include <MsgBoxConstants.au3> #include <GuiToolTip.au3> #include <WinAPI.au3> Global $idListview, $hWndListView Global $hToolTip = _GUIToolTip_Create(0, BitOR($_TT_ghTTDefaultStyle, $TTS_BALLOON)); balloon style tooltip Global Const $LVN_GROUPINFO = ($LVN_FIRST - 88) Global Const $tagNMLVGROUP = $tagNMHDR & ";int iGroupId;uint iNewState;uint iOldState" ; $LVGS_flags $LVGS_flags Func WM_NOTIFY($hWnd, $iMsg, $wParam, $lParam) #forceref $hWnd, $iMsg, $wParam Local $tInfo, $tNMHDR = DllStructCreate($tagNMHDR, $lParam), $hWndFrom = HWnd(DllStructGetData($tNMHDR, "hWndFrom")) Local $iIDFrom = DllStructGetData($tNMHDR, "IDFrom"), $iCode = DllStructGetData($tNMHDR, "Code") Switch $hWndFrom Case $hWndListView Switch $iCode ; Case $of?????? ; A Group was clicked <---- I need help with this Case $LVN_GROUPINFO ConsoleWrite("hier" & @CRLF) $tInfo = DllStructCreate($tagNMLVGROUP, $lParam) _DebugPrint("$LVN_GROUPINFO" & @CRLF & "--> hWndFrom:" & @TAB & $hWndFrom & @CRLF & _ "-->IDFrom:" & @TAB & $iIDFrom & @CRLF & _ "-->Code:" & @TAB & $iCode & @CRLF & _ "-->GroupId:" & @TAB & DllStructGetData($tInfo, "iGroupId") & @CRLF & _ "-->NewState:" & @TAB & DllStructGetData($tInfo, "iNewState") & @CRLF & _ "-->OldState:" & @TAB & DllStructGetData($tInfo, "iOldState")) Case $LVN_COLUMNCLICK ; A column was clicked $tInfo = DllStructCreate($tagNMLISTVIEW, $lParam) _DebugPrint("$LVN_COLUMNCLICK" & @CRLF & "--> hWndFrom:" & @TAB & $hWndFrom & @CRLF & _ "-->IDFrom:" & @TAB & $iIDFrom & @CRLF & _ "-->Code:" & @TAB & $iCode & @CRLF & _ "-->Item:" & @TAB & DllStructGetData($tInfo, "Item") & @CRLF & _ "-->SubItem:" & @TAB & DllStructGetData($tInfo, "SubItem") & @CRLF & _ "-->NewState:" & @TAB & DllStructGetData($tInfo, "NewState") & @CRLF & _ "-->OldState:" & @TAB & DllStructGetData($tInfo, "OldState") & @CRLF & _ "-->Changed:" & @TAB & DllStructGetData($tInfo, "Changed") & @CRLF & _ "-->ActionX:" & @TAB & DllStructGetData($tInfo, "ActionX") & @CRLF & _ "-->ActionY:" & @TAB & DllStructGetData($tInfo, "ActionY") & @CRLF & _ "-->Param:" & @TAB & DllStructGetData($tInfo, "Param")) ; No return value Case $NM_CLICK ; Sent by a list-view control when the user clicks an item with the left mouse button $tInfo = DllStructCreate($tagNMITEMACTIVATE, $lParam) _DebugPrint("$NM_CLICK" & @CRLF & "--> hWndFrom:" & @TAB & $hWndFrom & @CRLF & _ "-->IDFrom:" & @TAB & $iIDFrom & @CRLF & _ "-->Code:" & @TAB & $iCode & @CRLF & _ "-->Index:" & @TAB & DllStructGetData($tInfo, "Index") & @CRLF & _ "-->SubItem:" & @TAB & DllStructGetData($tInfo, "SubItem") & @CRLF & _ "-->NewState:" & @TAB & DllStructGetData($tInfo, "NewState") & @CRLF & _ "-->OldState:" & @TAB & DllStructGetData($tInfo, "OldState") & @CRLF & _ "-->Changed:" & @TAB & DllStructGetData($tInfo, "Changed") & @CRLF & _ "-->ActionX:" & @TAB & DllStructGetData($tInfo, "ActionX") & @CRLF & _ "-->ActionY:" & @TAB & DllStructGetData($tInfo, "ActionY") & @CRLF & _ "-->lParam:" & @TAB & DllStructGetData($tInfo, "lParam") & @CRLF & _ "-->KeyFlags:" & @TAB & DllStructGetData($tInfo, "KeyFlags")) ; No return value EndSwitch EndSwitch Return $GUI_RUNDEFMSG EndFunc ;==>WM_NOTIFY Func _DebugPrint($s_Text, $sLine = @ScriptLineNumber) ConsoleWrite( _ "!===========================================================" & @CRLF & _ "+======================================================" & @CRLF & _ "-->Line(" & StringFormat("%04d", $sLine) & "):" & @TAB & $s_Text & @CRLF & _ "+======================================================" & @CRLF) EndFunc ;==>_DebugPrint If Not StringInStr($CmdLineRaw, "/ErrorStdOut") Then Exit MsgBox($MB_TOPMOST, @ScriptName, 'please run from the editor, thanks', 10) Example() Func Example() Local $aInfo, $hImage, $idListview $ghui = GUICreate("ListView Group COLLAPSIBLE", 400, 300) $idListview = GUICtrlCreateListView("", 30, 20, 354, 218);, BitOR($LVS_SHOWSELALWAYS, $LVS_SINGLESEL, $LVS_REPORT, $WS_CLIPSIBLINGS)) $hWndListView = GUICtrlGetHandle($idListview) ; Load images $hImage = _GUIImageList_Create() _GUIImageList_Add($hImage, _GUICtrlListView_CreateSolidBitMap($idListview, 0xFF0000, 16, 16)) _GUIImageList_Add($hImage, _GUICtrlListView_CreateSolidBitMap($idListview, 0x00FF00, 16, 16)) _GUIImageList_Add($hImage, _GUICtrlListView_CreateSolidBitMap($idListview, 0x0000FF, 16, 16)) _GUICtrlListView_SetImageList($idListview, $hImage, 1) ; Add columns _GUICtrlListView_AddColumn($idListview, "Column 1", 100) _GUICtrlListView_AddColumn($idListview, "Column 2", 100) _GUICtrlListView_AddColumn($idListview, "Column 3", 100) ; Add items _GUICtrlListView_AddItem($idListview, "Row 1: Col 1", 0) _GUICtrlListView_AddSubItem($idListview, 0, "Row 1: Col 2", 1) _GUICtrlListView_AddSubItem($idListview, 0, "Row 1: Col 3", 2) _GUICtrlListView_AddItem($idListview, "Row 2: Col 1", 1) _GUICtrlListView_AddSubItem($idListview, 1, "Row 2: Col 2", 1) _GUICtrlListView_AddItem($idListview, "Row 3: Col 1", 2) ; Build groups _GUICtrlListView_EnableGroupView($idListview) _GUICtrlListView_InsertGroup($idListview, -1, 1, "Group 1", 1) ;~ _GUICtrlListView_SetGroupInfo($idListview, 1, "Group 1", 0, $LVGS_COLLAPSIBLE + $LVGS_COLLAPSED) ; <--- _GUICtrlListView_InsertGroup($idListview, -1, 2, "Group 2") ;~ _GUICtrlListView_SetGroupInfo($idListview, 2, "Group 2", 0, $LVGS_COLLAPSIBLE + $LVGS_COLLAPSED) ; <--- _GUICtrlListView_SetItemGroupID($idListview, 0, 1) _GUICtrlListView_SetItemGroupID($idListview, 1, 2) _GUICtrlListView_SetItemGroupID($idListview, 2, 2) GUIRegisterMsg($WM_NOTIFY, "WM_NOTIFY") Local $apos = _GUICtrlListView_GetGroupRect($idListview, 2, $LVGGR_LABEL) Local $test = GUICtrlCreateLabel("a", 2, 2, 10, 17) Local $val = _WinAPI_GetWindowLong(GUICtrlGetHandle($test), $GWL_STYLE) Local $valex = _WinAPI_GetWindowLong(GUICtrlGetHandle($test), $GWL_EXSTYLE) Local $aha = _WinAPI_CreateWindowEx($valex+$WS_EX_LAYERED, "static", "blabla", $val, $apos[0], $apos[1], 50, 20, $hWndListView) _GUIToolTip_AddTool($hToolTip, $hWndListView, "This is a ToolTip3", $aha) GUISetState(@SW_SHOW) ; Loop until the user exits. Do Until GUIGetMsg() = $GUI_EVENT_CLOSE GUIDelete() EndFunc ;==>Example Short description: I only created a label with CreateWindowEx which i can append to the listview control and layered it with the $WS_EX_Layered flag so it looks like it's transparent. Then i only added a tooltip tool to that created label.
      Hover over the Group 2 text and the Tooltip will be displayed. My question is: does someone know another perhaps much prettier solution?
      Thanks in advance
    • Wingens
      Metro style combo
      By Wingens
      Hi all,
      I created a little script we use at work for inputing date and time stamps into our ticket system.
      Now I thought it would look nice in a Metro style GUI, I found an UDF on the forum what does almost everything I want.
      I have but one thing I can't seem to find and don't have the skills to create.
      The gui uses one pulldown menu (GUICtrlCreateCombo) it stays in the older looking style.
      I attached the script and files I have, also in the zip you find an example of what I am looking for.
       
      Hope you guys can help me 
      Hotkey.zip
    • jaberwacky
      GuiBuilderNxt - Reboot [08/18/2016]
      By jaberwacky
      This is an update to GuiBuilder (CyberSlug, Roy, TheSaint, and many others) to run on the latest AutoIt Beta release.
       
      For a chronological history of GuiBuilder and other GUI designers see: >AutoIt GUI Creators (Designers).
      The seed of this effort is >here.
      Note: This is early stage software.  Please help by reporting issues.
      -----------------------------------------------------
      Now for the latest exciting installment!  Tabs are now available!  One tab can be added to the GUI.  Move it, resize it, and right click to add a new tab item!  More context menu items on the way.  Also upcoming is the ability to be able to add controls to each tab item.
      ---------------------------------------------------------
      GUIBuilderNxt - Reboot.zip - Exe included.
      dl: 4286
      Changelog:
      New Features and fixes:
      1) Show or hide control while moving or resizing control. *Currently bugged out*
      2) Option to show controls which have had their state set to hidden.
      3) Properties window for each control as they are selected.  This makes fine tuning a control easier.
      4) A button which will resize a control's width to fit the text.  Uses Melba23's _StringSize library.
      5) Remembers settings from the last session.
      6) GuiOnEvent mode.  CyberSlug made mention of wanting to do this in the early days of GuiBuilder.
      7) Maps rather than multidimensional arrays.
      8) Consistent control naming, (i.e., instead of Group1, Button2, Button3, Radio4 it would now be Group1, Button1, Button2, Radio1).
      9) Restructured the menubar layout per GuiBuilder Resurrected.
      10) Hotkeys switched to accelerators.
      11) Option to wipe the gui clear to the Edit menu.
      12) Select and move multiple controls at once by holding down Ctrl or using a selection rectangle.
      13) Copy, Paste and Delete multiple controls at once.
      14) Solid grid background that now resizes to fit the GUI.
       
      Roadmap:
      1) Get the Tab control to work correctly. *Still in progress*
      2) Finish adding properties settings to the control properties window.
      3) Make the code generation produce code with a better layout.
      4) Common GUI templates.  Ability to make your own templates too.
      5) Select multiple controls and use arrow keys (or other method?) to snap the selected controls to align to the chosen edge.
      6) Visual hints to tell you when you're within so many pixels from the edge of the window or control.  Mimics the gui designer of Visual Basic.
      7) Double click a control to edit the text.
      8) Visual hints to indicate selected controls, etc.
      9) Ability to create and store custom controls.
       
      Known issues:
      1)Many!
    • GMK
      OOo/LibO Calc UDF
      By GMK
      I decided to enhance the functionality of the OOo COM UDF found >here and >here.  Thanks to Leagnus and Andy G for providing the initial functions and framework.  I've managed to put many features here, but unfortunately, the feature I am unable to get to work is the sort feature.
      This UDF includes the following working functions:
      _OOoCalc_BookNew
      _OOoCalc_BookOpen
      _OOoCalc_BookAttach
      _OOoCalc_BookSave
      _OOoCalc_BookSaveAs
      _OOoCalc_BookClose
      _OOoCalc_WriteCell
      _OOoCalc_WriteFormula
      _OOoCalc_WriteFromArray
      _OOoCalc_HyperlinkInsert
      _OOoCalc_RangeMoveOrCopy
      _OOoCalc_CreateBorders
      _OOoCalc_NumberFormat
      _OOoCalc_ReadCell
      _OOoCalc_ReadSheetToArray
      _OOoCalc_RowDelete
      _OOoCalc_ColumnDelete
      _OOoCalc_RowInsert
      _OOoCalc_ColumnInsert
      _OOoCalc_SheetAddNew
      _OOoCalc_SheetDelete
      _OOoCalc_SheetNameGet
      _OOoCalc_SheetNameSet
      _OOoCalc_SheetList
      _OOoCalc_SheetActivate
      _OOoCalc_SheetSetVisibility
      _OOoCalc_SheetMove
      _OOoCalc_SheetPrint
      _OOoCalc_HorizontalAlignSet
      _OOoCalc_FontSetProperties
      _OOoCalc_CellSetColors
      _OOoCalc_RowSetColors
      _OOoCalc_ColumnSetColors
      _OOoCalc_RowSetProperties
      _OOoCalc_ColumnSetProperties
      _OOoCalc_FindInRange
      _OOoCalc_ReplaceInRange
      _OOoCalc_ErrorHandlerRegister
      Functions to be fixed/implemented:
      _OOoCalcRangeSort
      Please help me test this and let me know of any problems, questions, suggestions or comments you may have. I have tested this with LibreOffice, but not with OpenOffice.
      Edit (August 5, 2016): Latest files have been uploaded.  Script-breaking changes include renaming the functions to start with _OOoCalc_.
       
       
      OOoCalcConstants.au3
      OOoCalc_Demo.au3
      OOoCalc.au3