From: Marco T. <wx...@so...> - 2002-04-30 17:53:00
|
sorry for the delay, had to do other stuff. hope you still remember. i worked so long on my explanation, but looks like it was still not clear enough. well, here with a code example: sub OnDragOver { my ($this, $x, $y, $ret) = @_; if($ret == wxDragNone) { print "wxDragNone\n"; } elsif($ret == wxDragCopy) { print "wxDragCopy\n"; } elsif($ret == wxDragMove) { print "wxDragMove\n"; } else { print "strainge!!\n"; } } i always get wxDragNone. doesn't matter wich state the SHIFT or CONTROL keys have. i expect different returns. but don't know what i should get at which key states. (????) so i asked for an explanation why i always get wxDragNone (mistake from my side?) and how i can get if the CONTROL key is pressed (because i only have to differentiate between copy and move...) greetings&hope this time it's clearer Marco >> for wxDragResult the docs tell me that OnDragOver: >> Returns the desired operation or wxDragNone. >> -> Determined by SHIFT or CONTROL key states. > >> because of this, i expect this return values: >> -> "wxDragCopy" if i press "Control" >> -> "wxDragMove" if i press no key or "Shift" >> -> "wxDragNone" never > ^^^^^ > well it is returned if you want to reject the operation > >> can someone bring light into my darkness and explain me in which >> situation which value should be returned? >This is to give feedback to the user. This value will be returned >from DoDragDrop when the data is dropped. > >> or why wxPerl/wxWindows always returns "wxDragNone"? i mean >> "wxDragResult" should follow the key states... >? where does it return wxDragNone? > >> respectively, i just wish to differentiate between "wxDragCopy" and >> "wxDragMove" and wish to know if "Control" is pressed. >> How can i get this information? >use the fourth parameter to OnDragOver >---- >Suggested value for return value. Determined by SHIFT or CONTROL key states. >---- |