[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Widget Resize on Mac



Ben Tupper, btupper@bigelow.org writes:

> Has this been dealt with before?  if so, what is the solution?

    An ugly hack.
	
	My top level bases send only resize events, so in my event handler
I can have something like this (info is a pointer to a state
structure):

  Case event.id of
    (*info).myID: begin    ; resize event from top level base
      if !version.os_family eq 'MacOS' then begin
        xsize = event.x-12
        ysize = event.y-12
      endif else begin
        xsize = event.x
        ysize = event.y
      endelse
      (*info).mainWindow -> SetProperty, Dimension=[xsize, ysize]
      end    
  else: ; blah blah blah
  end  ; case event.id
  
  
	The value 12 was found by trial and error, but works for both
direct and object graphics windows (with the appropriate set size
commands.


Struan