I am a beginner and I am now trying to add an EMAIL button to each row of my ListView and I have no idea how to achieve that.
The intent is by clicking on email button, an email to be sent for to that particular user
Code: Select all
#SingleInstance force
SetWorkingDir %A_ScriptDir%
Data_Source:= "textInput.txt"
LV_Table(Data_Source,"`t",1,Title:="Enquery result")
Return
LV_Table(Data_Source, delimiter="`t",UseHeader=1,Title=""){
if FileExist(Data_Source) ;if file exists use it as source
FileRead, Data_Source, %Data_Source% ;read in and store as variable
data_obj := StrSplit(Data_Source,"`n","`r") ;parse earch row and store in object
rowHeader:=StrReplace(data_obj.RemoveAt(1),Delimiter,"|",Numb_Columns) ; Remove header from Object and convert to pipe delimited
if (useHeader=0){
loop, % Numb_Columns+1
RH.="Col_" A_Index "|"
rowHeader:=RH
}
dCols:= (Numb_Columns<10) ? 400: ((Numb_Columns<80) ? 650 : 1100) ;if cols <10 use 400; if cols <80 use 650 ; else use 1100
dRows:= (data_obj.MaxIndex() >27) ? 26 : data_obj.MaxIndex() ;if rows >27 use 26 else use # of rows
Gui, Table_View: New,,%Title% ;create new gui window and set title
Gui, Font, s12, Century Gothic
Gui, Add, ListView, r%dRows% w%dCols% report grid, % rowHeader ;set headers
For Each, Row In data_obj ;add the data lines to the ListView
LV_Add("", StrSplit(Row, Delimiter)*) ;LV_Add is a variadic function
LV_ModifyCol(1, "Auto") , LV_ModifyCol(2, 100), LV_ModifyCol(2, "SortDesc"), LV_ModifyCol(2, "center")
Gui, Table_View:Show
}
Spoiler
Can some one help me doing that?(columns 1 currently contains some dummy usernames for the sake of example. In real life, there is no duplicate value)