downloads | documentation | faq | getting help | mailing lists | licenses | wiki | reporting bugs | php.net sites | conferences | my php.net

search for in the

Funciones de Newt> <Ejemplos
[edit] Last updated: Fri, 17 May 2013

view this page in

Uso básico

Este ejemplo es un puerto de PHP de diálogo de la utilidad 'setup' de RedHat, ejecutado en modo texto.

Ejemplo #1 Ejemplo de uso de newt

<?php
newt_init 
();
newt_cls ();

newt_draw_root_text (00"Test Mode Setup Utility 1.12");
newt_push_help_line (null);
newt_draw_root_text (-300"(c) 1999-2002 RedHat, Inc");

newt_get_screen_size ($filas$columnas);

newt_open_window ($filas/2-17$columnas/2-103417"Elija una herramienta");

$form newt_form ();

$list newt_listbox (3210);

foreach (array (
    
"Configuración de autenticación",
    
"Configuración del cortafuegos",
    
"Configuración del ratón",
    
"Configuración de la red",
    
"Configuración de la impresora",
    
"Servicios del sistema") as $l_item)
{
    
newt_listbox_add_entry ($list$l_item$l_item);
}

$b1 newt_button (512"Ejecutar herramienta");
$b2 newt_button (2112"Salir");

newt_form_add_component ($form$list);
newt_form_add_components ($form, array($b1$b2));

newt_refresh ();
newt_run_form ($form);

newt_pop_window ();
newt_pop_help_line ();
newt_finished ();
newt_form_destroy ($form);
?>


add a note add a note User Contributed Notes Uso básico - [0 notes]
There are no user contributed notes for this page.

 
show source | credits | stats | sitemap | contact | advertising | mirror sites