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 

Adding resizing to ClearWIN (not +) window

 
Post new topic   Reply to topic    forums.silverfrost.com Forum Index -> General
View previous topic :: View next topic  
Author Message
wahorger



Joined: 13 Oct 2014
Posts: 1217
Location: Morrison, CO, USA

PostPosted: Sun Aug 02, 2015 1:42 pm    Post subject: Adding resizing to ClearWIN (not +) window Reply with quote

I am trying to allow my users to COPY the contents of the ClearWIN window that is attached to the standard output unit. Using a create_window@() call gets me the window with resizing allowed, maximize control, etc.

I am not finding an option to use to "manually" create a window with the same attributes so that I can also attach a COPY option.

The following creates the window, allows attachment to the default unit, and scrolling, but it cannot be resized. I have tried using set_clearwin_style@ but without success; there does not appear to be an option to allow resizing of the window using WS_*.

Code:

   i = winio@('%pv%`132.40cw[hscroll,vscroll]&',0L,handle2)
   i = winio@('%ca[Output]&')
   i = winio@('%ac[CTRL+C]&','COPY')
   i = winio@('%lw',status2)


I have searched for an other %cw options other than the ones shown, but am not finding anything in the documentation (chm, pdf, or otherwise).
Back to top
View user's profile Send private message Visit poster's website
LitusSaxonicum



Joined: 23 Aug 2005
Posts: 2388
Location: Yateley, Hants, UK

PostPosted: Sun Aug 02, 2015 10:35 pm    Post subject: Reply with quote

My take on this is:

Code:
      WINAPP
      PROGRAM SILVER
      INCLUDE <WINDOWS.INS>
      i = winio@('%ca[Output]%sy[3d]&')
      i = winio@('%pv%`132.40cw[hscroll,vscroll]&',0L,ihandle2)
      i = winio@('%ww[maximise]&')
      i = winio@('%ac[CTRL+C]&','COPY')
      i = winio@('%lw',istatus2)
      END


The %sy is only needed so I could see the outline of the %cw. Use the resize control and then the window is scalable - the %cw scales with it because it has the pivot.

Eddie
Back to top
View user's profile Send private message
wahorger



Joined: 13 Oct 2014
Posts: 1217
Location: Morrison, CO, USA

PostPosted: Sun Aug 02, 2015 11:25 pm    Post subject: Reply with quote

Eddie,

Many thanks! I had not thought about trying the ww after the cw; that was the key!!

I took out the [maximise]. The window it did create without that was perfectly sized and visible behind the main window (where it belonged).

I knew someone here could get me past this!!

Thanks again, Eddie!
Bill
Back to top
View user's profile Send private message Visit poster's website
LitusSaxonicum



Joined: 23 Aug 2005
Posts: 2388
Location: Yateley, Hants, UK

PostPosted: Mon Aug 03, 2015 11:24 am    Post subject: Reply with quote

Hi Bill,

There are lots of options with both %sy and %ww, and a lot of experience is needed to decide which one or both is needed.

Experience has shown me the need to prevent dialog boxes from being resized as if they don't have a scalable control in them they look ugly, and that also means that you need to suppress the system menu in the top left corner that we often forget about. This is also the reason why dialog boxes don't have a minimise icon (%mi) - whereas independent windows that can be minimized do.

You can put %ww anywhere, but %sy needs to go before any controls are created.

I think that %cw areas should be called 'Clearwin Fortran Formatted output controls' as 'Clearwin window' is confusing. There was a thread about text properties in a %cw control, including colour, italics etc. This uses functionality that FTN95.CHM describes as obsolete (it isn't). I can't find the thread right now, but note 336 in CWPLUS.ENH explains it.

Eddie
Back to top
View user's profile Send private message
wahorger



Joined: 13 Oct 2014
Posts: 1217
Location: Morrison, CO, USA

PostPosted: Mon Aug 03, 2015 4:32 pm    Post subject: Reply with quote

Thanks, Eddie. I'll look for those references you've given to expand my knowledge.

It's always a good thing to learn something new!
Bill
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    forums.silverfrost.com Forum Index -> General 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