Sigma Php Ajax framework, Ajax Components, GUI Builder
May 24, 2012, 11:47:58 AM *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News:
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: Tutorial 5 - Drag & Drop  (Read 3909 times)
steven
Moderator
Hero Member
*****
Posts: 544



View Profile
« on: January 22, 2009, 01:41:55 AM »

Drag & Drop is a very interesting thing, I guess it could be a feature of web2.0. With Sigma Visual builder, you can add this feature without any code.
Before we do something, we need to know two properties, dragKey and dropKeys. A lot of Sigma Visual components have these two properties. Just remember one thing, components with dragKey ABC could only be dragged into those components with dropKeys containing ABC. Take the following table for example

----------------------------
          |dragKey|dropKeys|
---------------------------
ComponentA|AA     |        |
----------------------------
ComponentB|       |AA      |
----------------------------
ComponentC|       |AA:BB   |
----------------------------
ComponentD|       |CC:BB   |
----------------------------

ComponentA can be dragged and dropped into ComponentB and ComponentC, but not into ComponentD. ComponentD accepts components with CC or BB as their dragKey.


[Req Spec]
1. Two lists are needed.
2. End user could drag one item from one to another.

[Do It Yourself]
1. Drag a
    to design area,set its dragKey to "apple"(Click
    to select it, type "apple" in
[Component Config Window]->[properties]->[dragKey],and strike [Enter] on keyboard. )
2. Drag another
    to design area,set its dropKeys to "apple:pear"(Click
    to select it, type "apple:pear" in
[Component Config Window]->[properties]->[dropKeys],and strike [Enter] on keyboard. )
3. Press [run] to see the result. You could drag item from first to second, but can't from second to first list.

[Conclusion]
1. dragKey could be any string without colon( : ).
2. dropKeys could be a combination of dragKey splitted by colon( : ).
3. components with dragKey ABC could only be dragged into those components with dropKeys containing ABC.
4. Dragging & dropping could be performed between different type of components, for instant, from list to radiobox.[/list][/list][/list][/list]
« Last Edit: March 13, 2009, 01:39:53 AM by steven » Logged

Sigma AJAX Data Grid - Easy to Integrate with PHP, ASP Classic, ASP.NET & Java
Sigma PHP Ajax Framework - WYSIWYG GUI Builder With Tree, Grid, Treegrid, Dialog, Tab & More Component
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.7 | SMF © 2006-2008, Simple Machines LLC Valid XHTML 1.0! Valid CSS!