Placement of popup ( CellRendererDate from examples )
- From: Daniel Kasak <dkasak nusconsulting com au>
- To: gtk-perl-list gnome org
- Subject: Placement of popup ( CellRendererDate from examples )
- Date: Tue, 06 Sep 2005 09:31:09 +1000
Greetings.
I'm using some code from the example folder to provide a
CellRendererDate in a treeview. I've had some complaints that the
calendar goes off-screen if the cell being edited is too far down the
screen.
The code that positions the popup is ( from the cellrendererdate.pl
example script ):
# Align the top right edge of the popup with the the bottom right edge
of the
# cell.
my ($x_origin, $y_origin) = $view -> get_bin_window() -> get_origin();
$popup -> move(
$x_origin + $cell_area -> x() + $cell_area -> width() - $popup ->
allocation() -> width(),
$y_origin + $cell_area -> y() + $cell_area -> height()
);
How would I go about modifying this to detect whether the calculated y
position puts part of the calendar off-screen?
I know ( or I think I know anyway ... I haven't tried it yet ) I can do
$popup->allocation to get the size of the popup. But how do I get the
screen size?
--
Daniel Kasak
IT Developer
NUS Consulting Group
Level 5, 77 Pacific Highway
North Sydney, NSW, Australia 2060
T: (+61) 2 9922-7676 / F: (+61) 2 9922 7989
email: dkasak nusconsulting com au
website: http://www.nusconsulting.com.au
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]