Re: Re: GtkSheet style
| From: | Alan Knowles | Date: | Wed, 12 Jan 2005 00:28:58 +0000 |
| Subject: | Re: Re: GtkSheet style | ||
| References: | 1 2 3 4 5 | Groups: | php.gtk.dev |
| Request: | Send a blank email to php-gtk-dev+get-845@lists.php.net to get a copy of this message | ||
Can you send over a diff to the extra.overides
-have a look at the file, and add this method to it + the %% override command.
-run cvs diff -u > mypatch.txt
- send the mypatch.txt to the mailing list.
And I'll patch the source.
Regards
Alan
Steph wrote:
Ivan, next time you foray into C, would you mind using the php-gtk-dev list? You're scaring the newbies! ;) Did you try coding the gdkcolor in a way that doesn't rely on your OS? - things like 'yellow' are open to interpretation (via rgb.txt or whatever). - Steph ----- Original Message ----- From: "Ivan Rodriguez" <epplestun@gmail.com> To: "Alan Knowles" <alan@akbkhome.com> Cc: <php-gtk-general@lists.php.net> Sent: Tuesday, January 11, 2005 8:06 PM Subject: Re: [PHP-GTK] Re: GtkSheet style Hi Alan I edit the gen_extra.c file and I wirte this: PHP_FUNCTION(gtk_sheet_range_set_background) { int row0, col0, rowi, coli; GtkSheetRange *range; zval *php_color; GdkColor *color; NOT_STATIC_METHOD(); if (!php_gtk_parse_args(ZEND_NUM_ARGS(), "iiiiO", &row0, &col0, &rowi, &coli, &php_color, gdk_color_ce)) return; range->row0 = (gint)row0; range->col0 = (gint)col0; range->rowi = (gint)rowi; range->coli = (gint)coli; color = PHP_GDK_COLOR_GET(php_color); gtk_sheet_range_set_background(GTK_SHEET(PHP_GTK_GET(this_ptr)), (GtkSheetRange *) range, color); RETURN_NULL(); } .... {"range_set_background", PHP_FN(gtk_sheet_range_set_background), NULL}, The code works fine, but I have one problem, the color is not the orignal color, for example: $bgcolor = &new GdkColor("yellow"); $sheet->range_set_background(0, 0, 0, 2, $bgcolor); This code colorize the first 3 colums of the first row, but the background color is not yellow, the color change when I start the script, and puts green, red or other colors, why this? Any sugestion? El mar, 11-01-2005 a las 05:40, Alan Knowles escribió:donÃ,´tI suspect I never wrote bindings for GtkSheetRange.. or that method is not generated due to the const-GtkSheetRange, It's been a long while since I looked at it.. Regards Alan Ivan Rodriguez wrote:Hi I read the file extra.defs and here the methods are defined .... (method range_set_background (of-object Sheet (Gtk)) (c-name gtk_sheet_range_set_background) (return-type none)(parameter (type-and-name const-GtkSheetRange* range)) (parameter (type-and-name const-GdkColor* color))) (method range_set_foreground (of-object Sheet (Gtk)) (c-name gtk_sheet_range_set_foreground) (return-type none)(parameter (type-and-name const-GtkSheetRange* range)) (parameter (type-and-name const-GdkColor* color))) ... But the GtkSheet object don't have the methods to use in PHP, why this? I don't understand because other methods works fine. Any sugestion? Regards El lun, 10-01-2005 a las 17:44, Ivan Rodriguez escribiÃf³:Hi IÃ,´m trying to set a backgorund color to cell of GtkSheet, but I
know how to set, I believe that the object does not support all the metodos of the real object, since they do not appear many methods in the manual, i.e: range_set_background, range_set_border, range_set_font ... and many more My question is, is posible to set a background color to cell? Regards