04-13-2019, 10:24 PM (This post was last modified: 04-13-2019, 10:26 PM by win.)
Hello, the code below is a bit of a problem. When I type the letter o, the whole word onekey is displayed, Please see the picture below.
In addition, I need to achieve an effect, because the first two letters are the same for these three words (one[]only[]onekey[]).
So, when I type the letter on, the edit box will become a drop-down list that shows the three words. I can use the arrow keys to make a selection. This feature is very practical, Can this be achieved?
;Automatically completes when you type in edit control. ;Call from dialog procedure, on EN_CHANGE. For grid control (edit or combo cell), call on GRID.LVN_QG_CHANGE.
;hEdit - edit control handle. ;items - list of items.
I added a combo box, but the effect in the combo box is not the same as the effect in the edit box. For example, enter the letter r. See the image below.
In addition, I need to achieve an effect, when I enter a letter, if the word I need is in the first place, after I press the Enter key, the word, all appear in the edit box, for example, enter the letter a, enter After that, Autotext1 will appear in the edit box, please see the picture below.
This features can meet the needs of the link below
04-14-2019, 02:45 AM (This post was last modified: 04-14-2019, 02:57 AM by Kevin.)
for starters this line in wrong
case EN_CHANGE<<16|4 sub.OnTextChanged lParam
its a ComboBox not an edit control
that line does nothing. The event never fires!
case CBN_EDITCHANGE<<16|4
but using this
case CBN_EDITCHANGE<<16|4 sub.OnTextChanged lParam
the drop box will fire below the combobox.
Not sure why you want a combobox and then want to create another dropdown box
04-14-2019, 03:00 AM (This post was last modified: 04-14-2019, 03:55 AM by win.)
The list box below the combo box, I can directly double-click the item inside, sometimes it is very convenient to operate
How make search results appear in the list below the combo box?
My ultimate goal is to achieve three-level management of Autotext, as shown below
When I click the folder in the list in the first combo box, the file inside it will appear in the list in the second combo box. When I click on the file name, the items in the file appear in the list of the third combo box, Finally, when I press the OK button, It will automatically jump to the item(subfunction) of the file
sel message ,caseWM_INITDIALOG ,caseWM_DESTROY ,caseWM_COMMANDgoto messages2 ret ;messages2 sel wParam ,caseIDOK ,caseIDCANCEL ,caseCBN_EDITCHANGE<<16|3sub.OnTextChanged lParam ret1
#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 01)<0)continue ,x.AddRow1(-1 aList[i]) if(!x.RowCount)ret
if(ShowDropdownList(x i 01 hEdit 000 ddl)&QMDDRET_SELOK=0)ret
s=x.Cell(i+10)
inERS=1 EditReplaceSel hEdit 0 s 1
inERS=0
It’s a bit strange, I can filter if I don’t set any events, please see the image below.
It is very convenient to use the combo box with filtering function to achieve the above goals, but the programming difficulty is also the biggest.
04-14-2019, 11:05 AM (This post was last modified: 04-14-2019, 11:19 AM by win.)
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.