WebSite-PHP Framework PHP
Multi langues
Mode Ajax simple
Aucun HTML, aucun JavaScript
URL rewrinting
Envoi d'email
Sitemap - RSS - Web service
Télécharger le Framework WebSite-PHP maintenant
 


Loading
 


Tutorial : Context menu

Tutoriels

>

Tutoriel Menu

>

Tutorial : Context menu


Menu-05: Tutoriel du composants Menu du FrameWork PHP WebSite-PHP.

Tutorial : Context menu:

Click right button


Retourner aux tutoriels du composants Menu



Code source

Code source


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

<?php
class Menu05 extends Page {
    public function 
InitializeComponent() {
        
parent::$PAGE_TITLE "Tutorial : Context menu";
        
        
$menu_object = new Object("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());
    }
}
?>


Retourner aux tutoriels du composants Menu


Share

 


Copyright © 2009-2016 WebSite-PHP Framework PHP
Accueil Documentation Télécharger Quick start Tutoriels Wiki Issue Tracker