Re: Column heading for GtkTreeViewColumn
| From: | Steph Fox | Date: | Tue, 11 Apr 2006 01:03:04 +0000 |
| Subject: | Re: Column heading for GtkTreeViewColumn | ||
| References: | 1 | Groups: | php.gtk.general |
| Request: | Send a blank email to php-gtk-general+get-6860@lists.php.net to get a copy of this message | ||
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