Added EXTENDEDSELCT flag for list boxes which replaces MULTISELECT that now acts exactly as the real style flag ([double] click turns on or off selection)
git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@2415 212acab6-be3b-0410-9dea-997c60f758d6
This commit is contained in:
parent
442b19bc1f
commit
b9ae378533
3 changed files with 13 additions and 6 deletions
|
@ -58,12 +58,13 @@ char *STRDUP(const char *c)
|
|||
|
||||
// listbox flags
|
||||
#define FLAG_MULTISELECT (64)
|
||||
#define FLAG_EXTENDEDSEL (128)
|
||||
|
||||
// combobox flags
|
||||
#define FLAG_DROPLIST (128)
|
||||
#define FLAG_DROPLIST (256)
|
||||
|
||||
// bitmap flags
|
||||
#define FLAG_RESIZETOFIT (256)
|
||||
#define FLAG_RESIZETOFIT (512)
|
||||
|
||||
struct TableEntry {
|
||||
char *pszName;
|
||||
|
@ -460,6 +461,7 @@ bool ReadSettings(void) {
|
|||
{ "PASSWORD", FLAG_PASSWORD },
|
||||
{ "DROPLIST", FLAG_DROPLIST },
|
||||
{ "MULTISELECT", FLAG_MULTISELECT },
|
||||
{ "EXTENDEDSELCT", FLAG_EXTENDEDSEL },
|
||||
{ "FILE_EXPLORER", OFN_EXPLORER },
|
||||
{ "FILE_HIDEREADONLY", OFN_HIDEREADONLY },
|
||||
{ "RESIZETOFIT", FLAG_RESIZETOFIT },
|
||||
|
@ -835,8 +837,10 @@ int createCfgDlg()
|
|||
title = pFields[nIdx].pszState;
|
||||
break;
|
||||
case FIELD_LISTBOX:
|
||||
if (pFields[nIdx].nFlags & FLAG_MULTISELECT)
|
||||
if (pFields[nIdx].nFlags & FLAG_EXTENDEDSEL)
|
||||
dwStyle |= LBS_EXTENDEDSEL;
|
||||
if (pFields[nIdx].nFlags & FLAG_MULTISELECT)
|
||||
dwStyle |= LBS_MULTIPLESEL;
|
||||
break;
|
||||
}
|
||||
|
||||
|
@ -899,7 +903,7 @@ int createCfgDlg()
|
|||
pszEnd++;
|
||||
}
|
||||
if (pFields[nIdx].pszState) {
|
||||
if (pFields[nIdx].nFlags & FLAG_MULTISELECT && nFindMsg == LB_FINDSTRINGEXACT) {
|
||||
if (pFields[nIdx].nFlags & (FLAG_MULTISELECT|FLAG_EXTENDEDSEL) && nFindMsg == LB_FINDSTRINGEXACT) {
|
||||
SendMessage(hwCtrl, LB_SETSEL, FALSE, -1);
|
||||
pszStart = pszEnd = pFields[nIdx].pszState;
|
||||
while (*pszStart) {
|
||||
|
|
|
@ -379,8 +379,11 @@ numbers from 1 to NumFields. Each Field section can contain the following values
|
|||
<tr>
|
||||
<td class="righttable">MULTISELECT</td>
|
||||
<td class="righttable">Used by "<span class="italic">Listbox</span>"
|
||||
controls to specify if more than item may be selected. If this flag
|
||||
is not specified,only one item may be selected from the list.</td></tr>
|
||||
controls. Turns string selection on or off each time the user clicks or double-clicks a string in the list box. The user can select any number of strings. If this flag and EXTENDEDSELCT are not specified, only one item can be selected from the the list.</td></tr>
|
||||
<tr>
|
||||
<td class="righttable">EXTENDEDSELCT</td>
|
||||
<td class="righttable">Used by "<span class="italic">Listbox</span>"
|
||||
controls. Allows multiple items to be selected by using the SHIFT key and the mouse or special key combinations. If this flag and MULTISELECT are not specified, only one item can be selected from the the list.</td></tr>
|
||||
<tr>
|
||||
<td class="righttable">RESIZETOFIT</td>
|
||||
<td class="righttable">This causes "<span class="italic">Bitmap</span>"
|
||||
|
|
Binary file not shown.
Loading…
Add table
Add a link
Reference in a new issue