forums.silverfrost.com Forum Index forums.silverfrost.com
Welcome to the Silverfrost forums
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

ClearWin window with vscroll

 
Post new topic   Reply to topic    forums.silverfrost.com Forum Index -> ClearWin+
View previous topic :: View next topic  
Author Message
jjgermis



Joined: 21 Jun 2006
Posts: 404
Location: Nürnberg, Germany

PostPosted: Tue Dec 28, 2010 6:35 pm    Post subject: ClearWin window with vscroll Reply with quote

Hi

The example user interface has a top and bottom box as shown in the figure below. The top box is for data input and the lower one for displaying the results. In the lower box is a clearWin window with a vertical scroll to display the results. It should be similar to the output window in the Plato IDE.



Last edited by jjgermis on Wed Dec 29, 2010 9:10 am; edited 6 times in total
Back to top
View user's profile Send private message
jjgermis



Joined: 21 Jun 2006
Posts: 404
Location: Nürnberg, Germany

PostPosted: Tue Dec 28, 2010 6:45 pm    Post subject: Reply with quote

The initial problem as explained above is fixed. Ragarding the lower box: The idea is to have a Clearwin window within a box. However, when I test the code it writes the results to a new Clearwin window (see figure below) and not the one defined in the code.
Question: What should I change in oder to direct the result to the desired window? The test code which produce the result in the figure is given at the end of this entry.
Code:
winapp
program enum
   use mswin
   implicit none
   integer :: i,j,ctrl
   character(len =20):: string
   ctrl = -1
   i=winio@('%ca[Enumarate fonts]&')
   i=winio@('%sy[thin_border]&')
   i=winio@('%bg[BTNFACE]&')
   i=winio@('%mn[E&xit]&','EXIT')
   ! Open a box
   i=winio@('%nl%ob[raised]&')
   i=winio@('Results %ff%nl&')
   ! Define a clearwin window
   i=winio@('%ob[depressed]%40.20cw[vscroll]%cb&',0)
   i=winio@('%lw&',ctrl)
   do j=1,1000
      call get_font_name@(string,j)
      if (string /=' ') then
         print *,j,'    [',string,']   '
      else
         exit
      endif
   enddo
   i=winio@('%cb')
end program enum
Back to top
View user's profile Send private message
Wilfried Linder



Joined: 14 Nov 2007
Posts: 314
Location: Düsseldorf, Germany

PostPosted: Wed Dec 29, 2010 4:37 pm    Post subject: Reply with quote

Code:
winapp
program enum
   use mswin
   implicit none
   integer :: i,ctrl,liste
   ctrl = -1
   i=winio@('%ca[Enumarate fonts]&')
   i=winio@('%sy[thin_border]&')
   i=winio@('%bg[BTNFACE]&')
   i=winio@('%mn[E&xit]&','EXIT')
   ! Open a box
   i=winio@('%nl%ob[raised]&')
   i=winio@('Results %ff%nl&')
   ! Define a clearwin window
   i=winio@('%ob[depressed]%40.20cw[vscroll]%cb&',6)
   i=winio@('%lw%cb',ctrl)
   i=liste()
end

integer function liste()
   use mswin
   implicit none
   integer :: j
   character(len =20):: string
   do j=1,1000
      call get_font_name@(string,j)
      if (string /=' ') then
         write(6,'(I4,A5,A20,A5)')j,'    [',string,']   '
      else
         exit
      endif
   enddo
   liste = 1
end


Best regards,
Wilfried
Back to top
View user's profile Send private message
jjgermis



Joined: 21 Jun 2006
Posts: 404
Location: Nürnberg, Germany

PostPosted: Wed Dec 29, 2010 5:26 pm    Post subject: Reply with quote

Hi Wilfried

thanks for your help! I think I understand now how to do this:
1.) define the fortran_unit (6 in this case)
2.) close the box which contains the ClearWin window after %lw, i.e. %lw%cb
3.) then call the function which output the results.

The posted code now produces the desired result.



Uploaded with ImageShack.us
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    forums.silverfrost.com Forum Index -> ClearWin+ All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
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