Silverfrost Forums

Welcome to our forums

resize graphic area on a property sheet

21 Mar 2009 3:55 #4370

Hello,

Does anyone know if it's possible to be able to use a pivot on a graphics region that is on a property sheet?

I have the following code which does bizarre things. Thanks.

Albert

winapp

Program testpivot
include <windows.ins>
external callback
integer :: ans

ans=winio@('%sh%ca[Sheet One]&',1)  !  first sheet
ans=winio@('%pv%^gr[user_resize,rgb_colours]',200,200,callback)

ans=winio@('%sh%ca[Sheet Two]',2)   ! second sheet

ans=winio@('%ww%pv%2ps',1,2)       ! combine sheets

end Program

subroutine callback
include <windows.ins>
integer:: x,y,resize
resize=clearwin_info@('GRAPHICS_RESIZING')
if (resize.EQ.1) then
  x=clearwin_info@('GRAPHICS_WIDTH')
  y=clearwin_info@('GRAPHICS_DEPTH')
  call draw_line_between@(0,0,x,y,RGB@(255,0,0))
endif


endsubroutine
25 Mar 2009 1:00 #4373

Albert, shouldn't callback be an integer function, that typically returns 1 ( or 0 ) John

26 Mar 2009 8:28 #4375

Hello John,

Thank you for replying. It doesn't seem to make any difference if the callback is a function or a subroutine, I tried both. I really don't know what to try to make this work.

Regards

Albert

26 Mar 2009 10:54 #4376

I'm not experienced with %sh and %pv, but I think the arguments '1' and '2' should be variables to receive the handle, and not values supplying the handles. I tried your example but did not see it crash. There certainly appears to be a problem re-sizing the graphics area. Also can you use %pv before %2ps ? Should you describe sheet 2 in more detail ? ie give it a text or graphics attribute that can be associated with %pv

John

Please login to reply.