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 : clickable Objects

Tutoriels

>

Tutoriel Object

>

Tutorial : clickable Objects


Object-07: Tutoriel du composants Object du FrameWork PHP WebSite-PHP.

Tutorial : clickable Objects:



click


click


Retourner aux tutoriels du composants Object



Code source

Code source


Fichier: /pages/tutorials/object/object-07.php

<?php
class Object07 extends Page {
    public function 
InitializeComponent() {
        
parent::$PAGE_TITLE "Tutorial : clickable Objects";
        
        
$form = new Form($this);
        
        
$green_square = new Object("<br/><br/>""click");
        
$green_square->setId("my_object_green_7");
        
$green_square->setStyle("background-color:#5BFF4F;cursor:pointer;");
        
$green_square->setAlign(Object::ALIGN_CENTER);
        
$green_square->setWidth(100);
        
$green_square->setHeight(100);
        
$green_square->onClick($form"onClickObject");
        
        
$red_square = new Object("<br/><br/>""click");
        
$red_square->setId("my_object_red_7");
        
$red_square->setStyle("background-color:#FF3300;cursor:pointer;");
        
$red_square->setAlign(Object::ALIGN_CENTER);
        
$red_square->setWidth(100);
        
$red_square->setHeight(100);
        
$red_square->onClick($form"onClickObject");
        
        
$form->setContent(new Object($green_square$red_square));
        
$this->render $form;
    }
    
    public function 
onClickObject($sender) {
        
$dialog = new DialogBox("onClickObject"
                            
"click: ".$sender->getId());
        
$this->addObject($dialog);
    }
}
?>


Retourner aux tutoriels du composants Object


Share

 


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