#1295 Few (more) questions about fwt

DanielFath Sat 6 Nov 2010

  1. Are fwt Widgets that belong to a Pane visible/have size before the onLayout method of their parent pane is called?
  2. Do fwt components outside Panes have prefSize different than (0,0)?
  3. Would fwt display components that have 0,0 size?
  4. How do I get the Monitor on which the Widget is displayed?
  5. How do I get absolute position of the Widget on the screen?

brian Sun 7 Nov 2010

  1. Widgets are laid out before being shown
  2. All "control" widgets have some preferred size - for label it would be based on text and font metrics
  3. theoretically no, not sure if SWT backed real widgets would really be hidden - they should
  4. Right now you would do this yourself via Widget.posOnDisplay and Monitor.screenBounds
  5. Widget.posOnDisplay

DanielFath Sun 7 Nov 2010

All "control" widget have some preferred size - for label it would be based on text and font metrics

Speaking of font metrics, is there any way to get fwt's font metrics without performing the calculations ourselves?

brian Sun 7 Nov 2010

Login or Signup to reply.