replica nfl jerseysreplica nfl jerseyssoccer jerseyreplica nfl jerseys forums.silverfrost.com :: View topic - Property sheets - captions
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 

Property sheets - captions

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



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

PostPosted: Wed Oct 14, 2020 6:13 pm    Post subject: Property sheets - captions Reply with quote

There is a difference in how the captions are displayed on Property Sheet tabs when they are provided explicitly, or supplied as a character string. The following code demonstrates this

Code:

   winapp
        program main
   integer propsheet(3) ! handle to the property sheet
        integer ii
        character*13:: caption='   caption   '
        ii = winio@('%sh%ca[   caption   ]sheet 1',propsheet(1))
        ii = winio@('%sh%ca@Sheet 2',propsheet(2),caption)
        ii = winio@('%2ps[ms_style,hot_track]',propsheet(1),propsheet(2))
        end


The first sheet will have the caption displayed with all the characters; that is, the spaces present before and after the text are displayed. The second sheet using a character variable does not have the trailing spaces displayed.

While this is perhaps a minor issue, because captions are used to identify the tabs, it is not possible to do an equivalent of "centering" by supplying spaces before and after the caption. I could dynamically build the caption in a local character string, then have winio@() execute it, but now brackets that I use in captions cannot be displayed. So, I am stuck...

Bill
Back to top
View user's profile Send private message Visit poster's website
wahorger



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

PostPosted: Wed Oct 14, 2020 9:51 pm    Post subject: Reply with quote

John, I may be mistaken about this, but it is likely that when winio@() processes the variable, it trims the spaces off of the back. That is why they are different. When I set a caption for a window, this does not happen. How can I tell? Because if I make the variable 250 characters in length, I'll get a really wide window displayed.

A property sheet, while having some windows properties, is a different animal.

Bill
Back to top
View user's profile Send private message Visit poster's website
LitusSaxonicum



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

PostPosted: Wed Oct 14, 2020 10:10 pm    Post subject: Reply with quote

Bill,

Sometimes you can get the trailing space characters to show if you replace n blanks with n-1 and a full stop (period to you). It's not all that obvious to most users. Eventually you may find out the real way to do it, but in the meantime you have a workaround!

Eddie
Back to top
View user's profile Send private message
PaulLaidler
Site Admin


Joined: 21 Feb 2005
Posts: 8211
Location: Salford, UK

PostPosted: Thu Oct 15, 2020 8:19 am    Post subject: Reply with quote

When using the @ system, trailing spaces are indeed removed.

Character number 127 in the ASCII table (named DEL) can be used as an alternative to a space (32). In the Microsoft "Character Map" dialog this is call a "no-break space".

You can copy and paste this in Plato. It's not UNICODE and you don't need UTF8.

You only need to change the final character to a no-break space.
Back to top
View user's profile Send private message AIM Address
wahorger



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

PostPosted: Sun Oct 18, 2020 6:47 pm    Post subject: Reply with quote

Paul, great news that there is a workaround that I can also make "transparent".

Thanks very much for your detective work.

Bill
Back to top
View user's profile Send private message Visit poster's website
wahorger



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

PostPosted: Tue Oct 20, 2020 12:48 am    Post subject: Reply with quote

This leaves a vertical bar on the right hand side of my captions.

However, using char(128+32) (basically a "space" with the high order bit set) does the job!

Bill


.
Back to top
View user's profile Send private message Visit poster's website
PaulLaidler
Site Admin


Joined: 21 Feb 2005
Posts: 8211
Location: Salford, UK

PostPosted: Tue Oct 20, 2020 8:47 am    Post subject: Reply with quote

Bill

The outcome will depend on the font being used.
Back to top
View user's profile Send private message AIM Address
wahorger



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

PostPosted: Tue Oct 20, 2020 3:51 pm    Post subject: Reply with quote

Noted. Thanks for this comment.

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 -> 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