Silverfrost Forums

Welcome to our forums

%OB alignment issues

8 Jun 2021 7:58 #27910

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

8 Jun 2021 8:26 #27912

Steve

Can you provide a working sample program?

%sb provides an alternative status bar. See item 399 in Silverfrost\FTN95\doc\cwplus.enh.

8 Jun 2021 8:57 #27913

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

8 Jun 2021 10:11 #27915

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.8) 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

8 Jun 2021 2:17 #27917

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:

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

8 Jun 2021 2:31 #27918

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

8 Jun 2021 5:08 #27922

Steve

I can see the problem and I think that I can fix it.

9 Jun 2021 11:17 #27931

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

9 Jun 2021 11:51 #27933

HI Paul

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

regards

steve

Please login to reply.