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 : Context menu

Tutorials

>

Tutorial Menu

>

Tutorial : Context menu


Menu-05: Tutorial der Komponente Menu vom PHP FrameWork WebSite-PHP.

Tutorial : Context menu:

Click right button


Zurück zum Tutorial der Komponente Menu



Quelltext

Quelltext


Datei: /pages/tutorials/menu/menu-05.php

<?php
class Menu05 extends Page {
    public function 
InitializeComponent() {
        
parent::$PAGE_TITLE "Tutorial : Context menu";
        
        
$menu_object = new WSPObject("Click right button");
        
$menu_object->setId("obj_menu_5");
        
$menu_object->setStyle("border:1px dashed gray;".
                                
"padding:5px;");
        
        
$context_menu = new ContextMenu("context_menu_5");
        
        
$context_menu->addItem("Menu 1"
                        
ContextMenu::CONTEXTMENU_ICON_LINK,
                        
$add_folder_event);
        
        
$menu_event = new ContextMenuEvent($this);
        
$menu_event->onClick("clickEvent")->setAjaxEvent();
        
$context_menu->addItem("Menu 2"
                        
ContextMenu::CONTEXTMENU_ICON_REDO,
                        
$menu_event);
        
        
$menu_object->setContextMenu($context_menu);
                                    
        
$this->render $menu_object;
    }
    
    public function 
clickEvent($sender$object) {
        
alert($object->getId());
    }
}
?>


Zurück zum Tutorial der Komponente Menu


Share

 


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