Tk Library Source Code

View Ticket
Login
Ticket UUID: 1499135
Title: Dynamic help balloon position wrong on dual screen WinXP PC
Type: Bug Version: None
Submitter: pertronic Created on: 2006-06-01 21:13:03
Subsystem: bwidget Assigned To: damonc
Priority: 5 Medium Severity:
Status: Closed Last Modified: 2009-06-26 21:36:36
Resolution: Fixed Closed By: oehhar
    Closed on: 2009-06-26 14:36:36
Description:
In BWidget 1.7, DynamicHelp::_show_help uses [winfo
vrootwidth .] when setting the position of the balloon.  
On a dual screen PC vrootwidth only returns the width
of the "first" screen. 

As a quick fix I changed :

  if { $x+$width > $scrwidth } {
     set x [expr {$scrwidth - $width}]
  }

to

  if { $x < $scrwidth & $x+$width > $scrwidth } {
     set x [expr {$scrwidth - $width}]
  }

in _show_help.

This dosen't position the balloon correctly at the
extreem right of the second screen.  However I don't
know how to get the combined width of the two screens
to fix it properly.
User Comments: oehhar added on 2009-06-26 21:36:36:
Hi Gregor,
thank you for the report. It is now fixed with the assumption, that:
- all screens have the same size
- all screens are directly one beside the other
Unfortunately, both are not true in general, but the current solution is a step forward.

I have read that there is no way to find the screen geometries of the other screens with tk, so this seams the best possible solution.

The fix in cvs also includes your solution.