mirror of
https://github.com/ultimatepp/ultimatepp.git
synced 2026-05-17 06:06:00 -06:00
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:
parent
97d19762d2
commit
685361024a
3 changed files with 36 additions and 0 deletions
|
|
@ -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();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue