CtrlLib: WithDropChoice now reacts to mouse wheel

git-svn-id: svn://ultimatepp.org/upp/trunk@6388 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
cxl 2013-10-03 07:56:21 +00:00
parent 97d19762d2
commit 685361024a
3 changed files with 36 additions and 0 deletions

View file

@ -11,6 +11,7 @@ DropChoice::DropChoice() {
dropfocus = true;
EnableDrop(false);
dropwidth = 0;
appending = false;
}
void DropChoice::EnableDrop(bool b)
@ -68,6 +69,12 @@ bool DropChoice::DataSelect(Ctrl& owner, DropChoice& drop, const String& appends
return true;
}
void DropChoice::DoWheel(int zdelta)
{
if(!appending)
DoKey(zdelta < 0 ? K_UP : K_DOWN);
}
bool DropChoice::DoKey(dword key) {
if(owner && !owner->IsReadOnly() && list.GetCount()) {
int q = list.GetCursor();