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 

%OB alignment issues

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



Joined: 04 Sep 2009
Posts: 108
Location: Manchester

PostPosted: Tue Jun 08, 2021 8:58 am    Post subject: %OB alignment issues Reply with quote

HI Paul

the behaviour of %ob seem to have changed at V8_74 of salflibc.dll

i use this %ob code to give feedback in an interactive graphic editor

IWIN = WINIO@('%5.1OB[STATUS,thin_panelled]&')
IWIN = WINIO@('%ld%cb&', HFD_STATUS_LED)

IWIN = WINIO@('%`BF%18HE%CB&')

IWIN = WINIO@('%`8rs%cb&', HFDPROMPT1)
IWIN = WINIO@('%`28rs%cb&', HFDPROMPT2)
IWIN = WINIO@('%`28rs%cb&', HFDPROMPT3)

The feedback text hfdprompt,2,3 no longer aligns with the start of the cell boarder. As a guess it looks as if it has changed from left justified to right justified

regards

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


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

PostPosted: Tue Jun 08, 2021 9:26 am    Post subject: Reply with quote

Steve

Can you provide a working sample program?

%sb provides an alternative status bar. See item 399 in Silverfrost\FTN95\doc\cwplus.enh.
Back to top
View user's profile Send private message AIM Address
LitusSaxonicum



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

PostPosted: Tue Jun 08, 2021 9:57 am    Post subject: Reply with quote

Steve,

For what it's worth, I was never really satisfied with the %ob option to create a status bar, but I have found Paul's new %sb option much more to my liking.

On the other hand, it is always frustrating when something did work, but no longer does so (my own pet peeve here is the drop shadow effect), but that can be as much Microsoft's 'fault' as it might be SF's.

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



Joined: 04 Sep 2009
Posts: 108
Location: Manchester

PostPosted: Tue Jun 08, 2021 11:11 am    Post subject: Reply with quote

Pual

program test
character*80 HFDPROMPT1,HFDPROMPT2,HFDPROMPT3
HFDPROMPT1 = 'text 1'
HFDPROMPT2 = '0123456789012345678901234567890 text 2'
HFDPROMPT3 = 'text 3'
IWIN = WINIO@('%3.1OB[STATUS,thin_panelled]&')
IWIN = WINIO@('%`8rs%cb&', HFDPROMPT1)
IWIN = WINIO@('%`28rs%cb&', HFDPROMPT2)
IWIN = WINIO@('%`28rs%cb&', HFDPROMPT3)
IWIN = WINIO@('%ff')
end
with salflibc.dll (23.14.15) it works as it has been for many years
with salflibc.dll (23.6.1.Cool the text alignment has changed (esp text 3)

I also notice that the width (and style) of the boxes have changed which might be the real issue. with the original DLL the second box was much larger than 28 characters so able to display the text without spilling over into box 3. text 3 is in the location it would have been with the original dll

steve
Back to top
View user's profile Send private message
LitusSaxonicum



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

PostPosted: Tue Jun 08, 2021 3:17 pm    Post subject: Reply with quote

Steve,

Not for a minute am I implying that you can't do this for yourself, but I had to have a go with %sb:

Code:
winapp
program test
INCLUDE<WINDOWS.INS>
INTEGER IAR(3)
character*80 HFDPROMPT1,HFDPROMPT2,HFDPROMPT3
COMMON/STEVE/HFDPROMPT1,HFDPROMPT2,HFDPROMPT3,IHWND
INTEGER, EXTERNAL :: INI_SB
IAR(1) = 30
IAR(2) = 70
IAR(3) = 28
HFDPROMPT1 = 'text 1'
HFDPROMPT2 = '0123456789012345678901234567890 text 2'
HFDPROMPT3 = 'text 3'

!IWIN = WINIO@('%3.1OB[STATUS,thin_panelled]&')
!IWIN = WINIO@('%`8rs%cb&', HFDPROMPT1)
!IWIN = WINIO@('%`28rs%cb&', HFDPROMPT2)
!IWIN = WINIO@('%`28rs%cb&', HFDPROMPT3)

IWIN = WINIO@('%gr&', 600, 300)
IWIN = WINIO@('%ca[Using SB format code]&')
IWIN = WINIO@('%sc%3sb%lc&',INI_SB, IAR, IHWND)
IWIN = WINIO@('%ff')

end

INTEGER FUNCTION INI_SB()
INCLUDE <WINDOWS.INS>
INTEGER IAR(3)
character*80 HFDPROMPT1,HFDPROMPT2,HFDPROMPT3
COMMON/STEVE/HFDPROMPT1,HFDPROMPT2,HFDPROMPT3,IHWND

CALL SET_STATUS_TEXT@ (IHWND, 0, HFDPROMPT1)
CALL SET_STATUS_TEXT@ (IHWND, 1, HFDPROMPT2)
CALL SET_STATUS_TEXT@ (IHWND, 2, HFDPROMPT3)

INI_SB = 2
END


Interestingly, %sb is a lot harder to set up, and gives no style options.

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



Joined: 04 Sep 2009
Posts: 108
Location: Manchester

PostPosted: Tue Jun 08, 2021 3:31 pm    Post subject: Reply with quote

Eddie

Its always easier seeing a working example

I did have a a look at %sb but then realised that i put a lot of non-text information into the %ob cells (status LEDs %ld , %ls,%rd,%rf etc. ) so it would be complicated to re-engineer

Thanks

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


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

PostPosted: Tue Jun 08, 2021 6:08 pm    Post subject: Reply with quote

Steve

I can see the problem and I think that I can fix it.
Back to top
View user's profile Send private message AIM Address
PaulLaidler
Site Admin


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

PostPosted: Wed Jun 09, 2021 12:17 pm    Post subject: Reply with quote

Steve

I have fixed this and here is a link to a new set of DLLs for you to try. If it works OK for you then I will update the sticky post.

https://www.dropbox.com/s/mkqqv8joo4g7cs5/newDLLs88.zip?dl=0
Back to top
View user's profile Send private message AIM Address
steveDoyle



Joined: 04 Sep 2009
Posts: 108
Location: Manchester

PostPosted: Wed Jun 09, 2021 12:51 pm    Post subject: Reply with quote

HI Paul

thanks for the fix. it now works as it did before

regards

steve
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