Per this doc: [ https://docs.wisej.com/docs/controls/general/drag-and-drop-1 ]
“Drag & drop in Wisej works exactly the same as in a desktop application”
Well I discovered that my two WiseJ flowlayoutpanels ( on a Wisej.Web.Form ) don’t believe you.
My little test project DYNAMICALLY creates buttons and adds them to a flowLayoutPanel1.Controls list
with the button property btn.AllowDrag = true;
These dynamically created buttons are to be drug to the next flowLayoutPanel “flowLayoutPanel2”
Well the dynamically added buttons are not invoking any events even remotely related to Drag / Drop.
I’ve got messageboxes all over the place on these various events including mouse down and dblClick
on various controls just to see if any respond. The FlowLayoutPanel ( the Source Panel #1) seems to be invoking some events
now that I set its “parent” the actual FORM itself to allow Drag but those are events on the flowLayoutPanel, when dragging it — ITSELF,
not the buttons inside of the panel ITSELF. ( and of course they are a hot mess, it doesn’t appear that you can access the list of Controls in this flowLayoutPanel
from the sender or event arguments
I’m hypothesizing that since the dynamically created buttons themselves don’t even generate a click event or mouseDown event that they assuredly are not going to invoke any drag events. UNTIL I add and associate events to these dynamic buttons on their creation.
Please advise ASAP thank you
I am attempting to manually add the event handler to my dynamic buttons and now this
[ https://stackoverflow.com/questions/45194678/how-can-i-manually-build-one-valid-drageventargs-object-in-order-to-call-the-win ]
Please attach a WinForms project that works the way you want it to work.
Best, Alaa
Humbly I have attached s sample solution. Hypothesis was Drag Drop on FormLayoutPanel
I am questioning the feasibility of creating appropriate event(s) for the dynamically created buttons
that are added to FormLayoutPanel as THEY , are the controls being drug to another FormLayoutPanel.
It seemed like a pretty straightforward question to me … but here is the test project anyway if that helps.
AGAIN for clarity per the document referenced above. which appears to operate on a row of a DataGridView.
It “SEEMS” like I will need to manually add — during the dynamic creation of my buttons their events for Drag Drop ?
I’d like to confirm the minimum required (drag drop related ) events that I need to slap onto these dynamic buttons in my FlowLayoutPanel as
well to Drag the dynamic buttons from FormLayoutPanel#1 to FormLayoutPanel#2
please & thank you
Hi,
Please attach a WinForms project that works the way you want it to work.
Best,
Alaa
//
Please login first to submit.