WebSite-PHP Framework PHP
Mehrsprachig
Einfacher Ajax Modus
Kein HTML, kein JavaScript
URL Rewriting
Mails senden
Sitemap - RSS - Web service
Laden Sie WebSite-PHP FrameWork jetzt herunter
 


Loading
 


Tutorial : draggable Object + 
 dropppable Object (with events)

Tutorials

>

Tutorial Object

>

Tutorial : draggable Object + dropppable Object (with events)


Object-04: Tutorial der Komponente Object vom PHP FrameWork WebSite-PHP.

Tutorial : draggable Object + dropppable Object (with events):

draggable
droppable


Zurück zum Tutorial der Komponente Object



Quelltext

Quelltext


Datei: /pages/tutorials/object/object-04.php

<?php
class Object04 extends Page {
    public function 
InitializeComponent() {
        
parent::$PAGE_TITLE "Tutorial : draggable Object + 
                                 dropppable Object (with events)"
;
        
        
$this->render = new WSPObject();
        
        
$green_square = new WSPObject("draggable");
        
$green_square->setId("my_object_green_4");
        
$green_square->setStyle("background-color:#5BFF4F;");
        
$green_square->setWidth(100);
        
$green_square->setHeight(100);
        
        
$drag_event = new DraggableEvent($this);
        
$drag_event->onDragEndJs("alert('end drag');");
        
$green_square->setDraggable(truefalse$drag_event);
        
        
$red_square = new WSPObject("droppable");
        
$red_square->setId("my_object_red_4");
        
$red_square->setStyle("background-color:#FF3300;");
        
$red_square->setWidth(100);
        
$red_square->setHeight(100);
        
        
$drop_event = new DroppableEvent($this);
        
$drop_event->onDropJs("alert('drop');");
        
$red_square->setDroppable(true$drop_event);
        
        
$this->render->add($green_square$red_square);
    }
}
?>


Zurück zum Tutorial der Komponente Object


Share

 


Copyright © 2009-2024 WebSite-PHP Framework PHP
Start Dokumentation Herunterladen Schnellstart Tutorials Wiki Issue Tracker