Re: Column heading for GtkTreeViewColumn

From: Date: Tue, 11 Apr 2006 02:52:06 +0000
Subject: Re: Column heading for GtkTreeViewColumn
References: 1 2 3 4 5  Groups: php.gtk.general 
Request: Send a blank email to php-gtk-general+get-6867@lists.php.net to get a copy of this message
Nope :) how do I know what you'll find GREAT? But Andrei's right, Laura and Luke's book is solid. I like Matt Zandstra's 'Teach Yourself PHP in 24 Hours' too, but I'm biased - I tech edited the third edition. (Don't buy anything earlier than that, even second-hand - and note, it doesn't cover MySQL. It just gives a solid grounding in PHP.) http://www.amazon.com/gp/product/B0002XM0T4/ref=pd_rhf_p_1/102-7173144-2541739?%5Fencoding=UTF8&v=glance&n=551440 It has some heart-warming reviews :) I can whole-heartedly recommend the beginner series @ zend.com too. Vikram Vaswani worked his butt off to write it, as did I to edit it, and I think it's probably still the best there is 'out there for free'. http://www.zend.com/php/beginners/ - Steph ----- Original Message ----- From: "Eddie Hixson" <eddie.hixson@gmail.com> To: "Steph Fox" <steph@zend.com> Cc: <php-gtk-general@lists.php.net>; "Andrei" <andrei@gravitonic.com> Sent: Tuesday, April 11, 2006 4:22 AM Subject: Re: [PHP-GTK] Column heading for GtkTreeViewColumn Steph, Thanks, that works beautifully. Can you recommend a GREAT book for a beginner on PHP & MySQL. Of course I am waiting on the Pro PHP-GTK book that is soon to be released. Thanks a TON, Eddie On 4/10/06, Steph Fox <steph@zend.com> wrote:
One of the joys of PHP... $colname = str_replace('_', '__', $key); ----- Original Message ----- From: "Eddie Hixson" <eddie.hixson@gmail.com> To: "Steph Fox" <steph@zend.com> Cc: <php-gtk-general@lists.php.net>; "Andrei" <andrei@gravitonic.com> Sent: Tuesday, April 11, 2006 3:34 AM Subject: Re: [PHP-GTK] Column heading for GtkTreeViewColumn Steph, Thanks for the response. I understand the reason it works the way it does now. However if you have by chance seen my other post on dynamic building of column types then you can understand my problem. I build my column names from an array of keys that are returned from a MySQL query. Most of the column names do have an underscore in the column name already Regards, Eddie On 4/10/06, Steph Fox <steph@zend.com> wrote: Hi Eddie, The way to display the underline here (and anywhere else you see this happening in a PHP-GTK 2 widget) is to double up on the underline, e.g. $column = new GtkTreeViewColumn('catalog__pk', $cell_renderer, 'text', 0); The purpose of the automatic underline is to provide a keyboard shortcut to the GtkButton that makes up part of the the GtkTreeViewColumn. You'll notice - if you keep your underlined 'p' as it was - that pressing 'Alt p" will have the same effect as if you'd clicked on the GtkTreeViewColumn; it will sort the column. This is normal with PHP-GTK 2 widgets, but most of them offer the option to turn the underline off. *Question to Andrei - should we offer that option here, or is it not possible in a composite widget like this? We need to make a decision on it one way or the other, and stick with it... if it's not too late already. - Steph ----- Original Message ----- From: "Eddie Hixson" <eddie.hixson@gmail.com> To: <php-gtk-general@lists.php.net> Sent: Tuesday, April 11, 2006 2:36 AM Subject: [PHP-GTK] Column heading for GtkTreeViewColumn Hi, See example below. Is this the correct behavior for column names with the underscore characters in the name. Many of my column names have this underscore character in them and display incorrectly. My question is. Is this the normal behavior and If so how should If fix it to display correctly? //the text renderer is used to display text $cell_renderer = new GtkCellRendererText(); $column = new GtkTreeViewColumn('catalog_pk', $cell_renderer, 'text', 0); $column->set_resizable(true); $column->set_sort_column_id(0); $treeview->append_column($column); This displays 'catalogpk' with an underline under the p. But if you do. $column = new GtkTreeViewColumn('catalog-pk', $cell_renderer, 'text', 0); This display 'catalog-pk' which is correct with the dash. Regards, Eddie -- PHP-GTK General Mailing List (http://gtk.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php


« previous php.gtk.general (#6867) next »