DragBegin in ListView

Started by Fred Tomke, November 27, 2009, 05:55:40 AM

Previous topic - Next topic

Fred Tomke

Hi,

something must have been changed. I can tell that the following was not so in OpenDCL 5.1.2.3 .

I have a palette.
There is a listview in the palette.
DragBegin is not allowed.
When shift key will be pressed OnKeyDown will be relesed to allow DragBegin (my idea was to allow only Drag&Drop by holding shift key to avoid unwanted moving)
While holding shift key another list view item is being picked to select a range of items. AllowDragBegin is still active.
When clicking the other listview item for selecting a range OnDragBegin and OnDragDropFromControl will be released although I didn't drag long enough that drag&drop should be started. In the end the latest picked item will disappear although nothing happens in the OnDragDropFromControl event.

Released events:
lst_prop_OnClicked = start of range
lst_prop_OnKeyDown: 16 - 42 = press shift key
lst_prop_OnKeyDown: 16 - 16426 (multiple times while holding shift key)
lst_prop_OnClicked = End of range
lst_prop_OnSetFocus
lst_prop_OnDragnDropBegin
lst_prop_OnDragnDropFromControl
lst_prop_OnKeyUp: 16 - -16342

That would be dangerous if clicking an item in a listview with enabled and allowed DragBegin and enabled and allowed Drop would cause the remove of items.

I hope that I early find the time for the sample...

Fred
Fred Tomke
Dipl.-Ing. (FH) Landespflege

[ landscaper - landscape developer - digital landscape and urban design]

Fred Tomke

Hello Owen,

I'm not sure if it is a bug or just missing of know-how:

If I load the sample I attached I see layernames in the list. If I click one it disappears although my code does nothing.
What am I doing wrong?

Fred
Fred Tomke
Dipl.-Ing. (FH) Landespflege

[ landscaper - landscape developer - digital landscape and urban design]

velasquez

Hello Fred 
Execelente this work. 
I could not test your code. 
Do you can me to say if a Tool Tip exists to show the text that is occult for the size of the field?

Thanks. 
velasquez

Fred Tomke

Hi velasquez,

QuoteI could not test your code.
Are there any error messages?  Does it not work? :-\

Quotea Tool Tip exists to show the text that is occult for the size of the field?
As far as I know there are no tooltips for trunked listview items. But there are tooltips for trunked tree nodes and items.

Fred
Fred Tomke
Dipl.-Ing. (FH) Landespflege

[ landscaper - landscape developer - digital landscape and urban design]

Kerry

Fred,

You say
QuoteDragBegin is not allowed.
however the Drag/Drop Allow Begin property in the ODCL is set to true ???

Without change, and without code analysis :

Command: LAYERORDER
edt_info=> OnkeyUp

Mouseover Pallete
edt_info=> OnMouseEntered

LeftClick LayerName
edt_info=>  OnDragnDropBegin
                OnDragnDropFromControl
Selected LayerName is removed from List.

Mouseover Pallete
edt_info=> OnMouseEntered
LayerName is restored to (bottom of)  List

//==

Shift LeftClick Layername
edt_info=>  OnDragnDropBegin
                OnDragnDropFromControl
                OnKeydown
List is highlighted from top (or from highlighted) to newly selected item
Selected item is removed from List

//==
Ctrl Click on unhighlighted list
Selection Highlights
edt_info=>  OnDragnDropBegin
                OnDragnDropFromControl

subsequent CtrlClick
Previous stays highlighted
Selection Highlights
edt_info=>  OnDragnDropBegin
                OnDragnDropFromControl
                OnKeyDown


//==
AltClick 

as LeftClick


//==
Of interest:
Sometimes a series of the OnMouseEntered event fire ... can't isolate cause, but one situation is when cursor is near the "X" close icon.

                     
Perfection is not optional.
My other home is TheSwamp

Fred Tomke

Kerry, as you can see at the Screenshot both are different programs. The first one is my final product. The code I've uploaded is a smaller sample for debugging. In the smaller sample is AllowDragBegin enabled, you are right.
And you can reproduce the problem that on clicking the item the clicked item will be removed.

Working with the shift key at the first screenshot is caused by the effect that OnDblClicked was not released when DragBegin is allowed.

Fred
Fred Tomke
Dipl.-Ing. (FH) Landespflege

[ landscaper - landscape developer - digital landscape and urban design]