 |
forums.silverfrost.com Welcome to the Silverfrost forums
|
View previous topic :: View next topic |
Author |
Message |
acp693
Joined: 04 Sep 2006 Posts: 56
|
Posted: Sat Mar 21, 2009 4:55 pm Post subject: resize graphic area on a property sheet |
|
|
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
Code: | 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 |
|
|
Back to top |
|
 |
JohnCampbell
Joined: 16 Feb 2006 Posts: 2615 Location: Sydney
|
Posted: Wed Mar 25, 2009 2:00 pm Post subject: |
|
|
Albert,
shouldn't callback be an integer function, that typically returns 1 ( or 0 )
John |
|
Back to top |
|
 |
acp693
Joined: 04 Sep 2006 Posts: 56
|
Posted: Thu Mar 26, 2009 9:28 am Post subject: |
|
|
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 |
|
Back to top |
|
 |
JohnCampbell
Joined: 16 Feb 2006 Posts: 2615 Location: Sydney
|
Posted: Thu Mar 26, 2009 11:54 am Post subject: |
|
|
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 |
|
Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|