Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Edit box displays a list of identical letters
#7
I redesigned the interface for AutoText management. Please see the image below.

There are two ways to find an AutoText items.

The first method: enter the name in the search box at the top, it will be automatically filtered, and the filtered list will be displayed. After you find it, you can click the "Edit" or "Run" button.

The second method: Gradually find the item you are looking for through three levels of lists (folders, files and items). Once found, you can click the "Edit" or "Run" button.

In addition, it has some other small features, such as :
A. create folders, files, items
B. The edit box in the combo box can be filtered by entering letters

I have a limited level of programming now, I can't finish it. I hope someone can provide some suggestions, thank you very much. 
Heart

Macro AutoText Management2
Code:
Copy      Help
QMITEM q; int i
ARRAY(str) atn
ARRAY(int) htvi
rep
,i=qmitem(-i 1|16 &q 1|2|4|8)
,if(i=0) break
,if q.itype=4
,,atn[]=q.name
,,htvi[]=q.htvi

;str sList
;sList=atn
;ARRAY(str) aList=sList

ARRAY(str) aList=atn
IQmDropdown ddl
int inERS

str dd=
;BEGIN DIALOG
;0 "" 0x90C80AC8 0x0 0 0 338 218 "AutoText Management" "4"
;11 Edit 0x54030080 0x200 127 9 120 13 ""
;9 ComboBox 0x54230641 0x0 7 49 104 138 ""
;3 ComboBox 0x54230641 0x0 117 49 104 138 ""
;4 ComboBox 0x54230641 0x0 227 49 104 138 ""
;6 Static 0x54000000 0x0 37 36 48 13 "Folder"
;7 Static 0x54000000 0x0 148 36 48 13 "File"
;8 Static 0x54000000 0x0 259 36 48 13 "item"
;10 Button 0x54032000 0x0 147 195 48 14 "Edit"
;5 Button 0x54032000 0x4 81 195 48 14 "Create"
;12 Static 0x54000000 0x4 71 11 50 12 "All items Search"
;1 Button 0x54030001 0x4 213 195 48 14 "Run"
;14 Static 0x54000010 0x20000 7 29 326 1 ""
;END DIALOG
;DIALOG EDITOR: "" 0x2040801 "*" "" "" ""

str controls = "11 9 3 4"
str e11 cb9 cb3 cb4
cb3=atn
if(!ShowDialog(dd &sub.DlgProc &controls)) ret


#sub DlgProc
function# hDlg message wParam lParam

sel message
,case WM_INITDIALOG
,case WM_DESTROY
,case WM_COMMAND goto messages2
ret
;messages2
sel wParam
,case IDOK
,case IDCANCEL
,case EN_CHANGE<<16|11 sub.OnTextChanged lParam
,;case CBN_EDITCHANGE<<16|3 sub.OnTextChanged lParam
ret 1

#sub OnTextChanged v
function hEdit

if(inERS) ret
if(ddl) ddl.Close; ddl=0

str s.getwintext(hEdit)
if(!s.len) ret

ICsv x._create
x.AddRow1(0 "")
int i
for i 0 aList.len
,if(find(aList[i] s 0 1)<0) continue
,x.AddRow1(-1 aList[i])
if(!x.RowCount) ret

if(ShowDropdownList(x i 0 1 hEdit 0 0 0 ddl)&QMDDRET_SELOK=0) ret
s=x.Cell(i+1 0)

inERS=1
EditReplaceSel hEdit 0 s 1
inERS=0


Attached Files Image(s)
   


Messages In This Thread
RE: Edit box displays a list of identical letters - by win - 04-14-2019, 11:05 AM

Forum Jump:


Users browsing this thread: 1 Guest(s)