Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Drag & Drop Planning

Status
Not open for further replies.

frecor

Programmer
Dec 5, 2011
3
ZA
Hi Guys

Any help will be appreciated!

I need to have a form that when it shows it needs to find data (employee no, department, estimate) and post it in the appropriate places. The places must be any objects that can take text (label,panels,edit etc) The form has to be divided into diffirent regions for the diffirent departments in the company. So when the form show it has to look for the region (space on the form) where this employee is working and then add her\him to that region snapping to the top left corner adding the next below the existing ones. It then has to take the (estimate) and calculate at the bottom what that deparments planned out is going to be for the day. Employees must be able to move around(drag and drop) to diffirent departments. When you click on an employee to move here to a different department for the day a colour must indicate the availble places she can work where she has experience in. When you add her\him there it has to change the planned output for that department. So I was thinking of having a panel for each department and then adding labels to (created at runtime) the labels depends on what the db lookup says. Eg.

Department: PS - Employees + Estimate - 232 - 54, 452 - 39, 125 - 50 this is what the db lookup wil find.

Now pnlPS adds 232,452,125 with a snap to top left. a Move over hint will display what this employee estimate is in that department. and so on and so on for 14 departments with diffirent names.

Then I must be able to click on eg. 232 popup hint her estimate and highlight here available departments if I want to move her.

So al in al I must be able to see what the planned output for the whole factory is estimated to be with the employee positions as it is displayed on this form. Chopping and Changing to make it as required.

Tomorrow must be able to go to the form again bring up yesterdays planing and then chop and change it based on todays plans and absentees.

I know this sounds crazy but a good challenge and a problem found in most manufacturing companies.
 
I would consider your reporting requirements and work backwards from there - and include your screen representation as a 'report'.

Getting TPanels to snap in below another TPanel in a scroll box is as easy as setting the .top value of the TPanel. The TScrollBox will redraw the panels for you in the new order. You can control the TPanel height and colour easily. And since they are easy to use as a container for other controls.
 
I figured it out. TPanel or TScrollBox will work perfect. FormShow will lookup all the employee numbers, create labels for each and then I'll change the parent of each to the corresponding owner department also change the top and left propery of the label. then make a ondrag % ondragdrop event for each and done.

Thanks for the help guys!!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top