Re: Help with scintilla and graphics in buttons
| From: | Ivan Rodriguez | Date: | Tue, 11 Nov 2003 11:14:11 +0000 |
| Subject: | Re: Help with scintilla and graphics in buttons | ||
| References: | 1 | Groups: | php.gtk.general |
| Request: | Send a blank email to php-gtk-general+get-4133@lists.php.net to get a copy of this message | ||
Hi Fernando
"Fernando Correa da Conceição" <fernando.conceicao@terra.com.br> escribió en
el mensaje news:20031111022817.87035.qmail@pb1.pair.com...
> I have many questions, can help me?
> 1.I´m creating a toolbar with some buttons. On gtk I can use "Stock
Buttons"
> with graphics for thinks like frist, next. There is the same think for
> php-gtk? How I do?
>
In PHP-GTK you can uso gtktoolbar and gtkbutton, into gtkbutton add a
gtkpixbuf with the image, you need a .xpm image
> 2. How I can show graphics like .ico for a button or a jpg image?
You need gdkpixbuf to render jpg images, you can use gdkpixbuf and insert
into the button this widget with the jog image
>
> 3. I will use glade and gladeXML in my script to create the window. How
can
> i add a scintilla control or how can i change from a custom control to
> scintilla?
>
You can´t insert directly scintilla widget from Glade, you can use a box and
the in you php code do:
$box = $glade->get_widget('box');
$s = new gtkscintilla();
$box->pack_start($s, true, true);
> 4. How I set sintax highlighting to XML?
>
To highligh the XML sintax you need to set the parser, see the gtkscintilla
methods and the scintilla .h and .c files and override and .defs files, here
you have all constants and all :-)
> 5. How I can get/put all contents to/from a variable?
>
To put some text into scintilla you can do:
$s = new gtkscintilla();
$s->insert_text(-1, $text); // the first parameter is the position -1 is the
end, and the second parameter is a string of text
> Many thanks!!!
> Fernando Correa da Conceição
> ICQ 168518047
>
> http://manualphp.sourceforge.net
> Participe da Tradução do Manual do PHP
>
> --
----- Original Message -----
From: "Christian Weiske" <cweiske@cweiske.de>
To: <php-gtk-general@lists.php.net>
Sent: Tuesday, November 11, 2003 12:06 PM
Subject: RE: [PHP-GTK] Help with scintilla and graphics in buttons