View previous topic :: View next topic |
Author |
Message |
wahorger

Joined: 13 Oct 2014 Posts: 1257 Location: Morrison, CO, USA
|
Posted: Wed Oct 14, 2020 6:13 pm Post subject: Property sheets - captions |
|
|
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 |
|
 |
wahorger

Joined: 13 Oct 2014 Posts: 1257 Location: Morrison, CO, USA
|
Posted: Wed Oct 14, 2020 9:51 pm Post subject: |
|
|
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 |
|
 |
LitusSaxonicum
Joined: 23 Aug 2005 Posts: 2402 Location: Yateley, Hants, UK
|
Posted: Wed Oct 14, 2020 10:10 pm Post subject: |
|
|
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 |
|
 |
PaulLaidler Site Admin
Joined: 21 Feb 2005 Posts: 8211 Location: Salford, UK
|
Posted: Thu Oct 15, 2020 8:19 am Post subject: |
|
|
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 |
|
 |
wahorger

Joined: 13 Oct 2014 Posts: 1257 Location: Morrison, CO, USA
|
Posted: Sun Oct 18, 2020 6:47 pm Post subject: |
|
|
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 |
|
 |
wahorger

Joined: 13 Oct 2014 Posts: 1257 Location: Morrison, CO, USA
|
Posted: Tue Oct 20, 2020 12:48 am Post subject: |
|
|
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 |
|
 |
PaulLaidler Site Admin
Joined: 21 Feb 2005 Posts: 8211 Location: Salford, UK
|
Posted: Tue Oct 20, 2020 8:47 am Post subject: |
|
|
Bill
The outcome will depend on the font being used. |
|
Back to top |
|
 |
wahorger

Joined: 13 Oct 2014 Posts: 1257 Location: Morrison, CO, USA
|
Posted: Tue Oct 20, 2020 3:51 pm Post subject: |
|
|
Noted. Thanks for this comment.
Bill |
|
Back to top |
|
 |
|