Silverfrost Forums

Welcome to our forums

Another ClearWin+ beta

26 Jun 2013 3:14 #12503

Thanks Paul! It is working now.

Detlef

11 Jul 2013 9:13 #12589

One functionality of the menu is gone when using %em. Pressing the corresponding key for the 1st letter of a menu item will be ignored. Comes this effect along with %em or can you fix it, Paul? Short example:

      winapp 
      program em_menu 
      integer  ::ic    
      external selected_menu_item
      ic=winio@('%em[w8]&') 
      ic=winio@('%mn[File[Load]]&', selected_menu_item) 
      ic=winio@('%mn[[Add]]&',  selected_menu_item) 
      ic=winio@('%mn[[Last]]&', selected_menu_item) 
      ic=winio@('%mn[Exit]', 'exit')       
      end

      integer*4 function selected_menu_item()
      character(len=40) :: clearwin_string@
      integer  ::ic    
      selected_menu_item = 2   
      ic= winio@ ('Selected Menu Item : %`10rs', clearwin_string@('CURRENT_MENU_ITEM'))
      end
11 Jul 2013 10:43 #12590

Hi Manfred,

This is a new one to me, as just pressing a letter at the top level menu gives me nothing - with or without %em, and although it works (new discovery) for sub-menu items, in the example it won't select 'Load' or 'Last' because they both start with L.

Aren't you supposed to select which letter activates a menu item by putting the ampersand in the menu name like this:

       ic=winio@('%mn[&File[L&oad]]&', selected_menu_item) 
       ic=winio@('%mn[[&Add]]&',  selected_menu_item) 
       ic=winio@('%mn[[&Last]]&', selected_menu_item) 
       ic=winio@('%mn[E&xit]', 'exit') 

Then the menu is selected with Alt + the letter (e.g. Alt+F) - and the key letter is underlined in the menu. The disadvantage is that you can't have two options set to the same letter (why I have put the ampersand on the 'o' of 'Load'. You can also attach accelerator keys using %ac, or within the %mn, thus bypassing various steps in the menu sequence.

Eddie

11 Jul 2013 11:22 #12591

Not sure what is happening here. I will have to log this for further investigation.

11 Jul 2013 11:44 #12592

Paul,

Quite a lot of Microsoft applications have that execrable ribbon, so testing what happens in a 'standard' windows context is difficult. I tried Notepad. A letter on its own never drops down a menu. In an already dropped menu, a letter sometimes selects an item. e.g. in Notepad's Help menu, with two items

View Help About Notepad

V does nothing, but H launches the help file. A launches the About box.

Similarly, in the File menu, which has two P items,

Page setup Print

P launches the print dialogue

The Edit menu has loads of accelerator keys listed, but mostly, they work with just the letter (Time/Date responds to D not T, even though there is no other T).

All of this is new to me, and I can't see a consistent pattern.

Eddie

3 Aug 2013 3:35 #12746

I have isolated the problem but, at the moment I don't know how to fix it.

First you press and then release the ALT key and this activates the main menu. Then you press the key for the first character of a menu item in order to select it. If you precede a character with an ampersand then this marks the key to use and the ampersand is required when the character is not the first in the name.

This works correctly without %em and it also works with %em provided %em is used without options. Also this works with %em[options] for the main menu bar but not for sub menus (nor popup menus?).

Unless it can find a fix, we will have to take this as a limitation of %em. That is, ALT followed by a key press does not work for sub menus and %em with options.

7 Aug 2013 5:31 #12760

I have managed to fix this problem (with menu accelerators) and I have uploaded a new 32 bit beta to http://www.silverfrost.com/beta/salflibc.exe.

12 Aug 2013 3:15 #12813

Quoted from PaulLaidler I have managed to fix this problem (with menu accelerators) and I have uploaded a new 32 bit beta to http://www.silverfrost.com/beta/salflibc.exe.

Thank you for your help, Paul. In the meantime i have found another tiny problem with the new dll's. Using the option 'left_align' with %th does not work any longer.

12 Aug 2013 4:08 #12814

Line color for the outer rectangle of an named %ob box is now identical with the text color for its top line. Is this the plan, Paul?

12 Aug 2013 4:45 #12815

Yes. I thought that this was more natural.

13 Aug 2013 8:26 #12818

The option 'left_align' in the format code %th does work in some dialogs. But in other dialogs which are very similiar the option is not working with the new dll's. Any idea, Paul?

13 Aug 2013 8:45 #12819

%th[left_align] has not changed. It only affects multiline tooltips.

Your query has highlighted a problem with %th[ms_style] which was not accepting multiline tooltips (only displaying the first line).

This has now been fixed but, with [ms_style], multiline text is always left-aligned and the option [left_align] is ignored.

13 Aug 2013 12:28 #12827

Paul, in the meantime i have found my mistake. It seems to me that dialogs can't have other %th options than the parent dialog. Otherwise i can see for instance two different tooltips at the same time.

13 Aug 2013 12:47 #12828

I have made a short program to show the strange effect. Press the 'Show' button in the first appearing dialog. Then move the mouse over the 'Close' button in the 2nd dialog and wait a little bit. You will see two different tooltips. Is this a bug, Paul?

      winapp      
      program tooltip_test
      character(len=300) :: hlp
      external do_on_close, do_on_show
      iw = winio@ ('%ww[no_sysmenu,topmost]&')
      iw = winio@ ('%bg[btnface]&')
      iw = winio@ ('%th[delay,left_align]&', 1, 10)
      iw = winio@ ('%fn[Tahoma]%ts&', 0.9d0)
      iw = winio@ ('%`ca[Tooltip Test]&')
      iw = winio@ ('%2.1ob[invisible, bottom_exit]&')      
      hlp = 'Check calculated SRS-spectra against listed limiting curves.'//char(10)//                             &
            'Values of the Pseudo-Velocity, the Rel. Displacement and the Equiv. Acceleration spectra'//char(10)// &
            'which exceed the limiting curve values are written to a file which has to be named after '//          &
            'pressing the 'Apply' button.'
      iw = winio@ ('%^?8bt[Show]@%cb&',  do_on_show, hlp)
      hlp = 'Close'
      iw = winio@ (' %^?8bt[Close]@%cb&', do_on_close, hlp)
      iw = winio@ (' %ff')
      end
!=================================================================================================================
      integer*4 function do_on_show()
!=================================================================================================================
      character(len=300) :: hlp     
      external do_on_close
      do_on_show = 2
      iw = winio@ ('%ww[no_sysmenu,topmost]&')
      iw = winio@ ('%bg[btnface]&')
      iw = winio@ ('%th[balloon]&', 1)
      iw = winio@ ('%fn[Tahoma]%ts&', 0.9d0)
      iw = winio@ ('%co[client_edge]&') 
      hlp = 'Check calculated SRS-spectra against listed limiting curves.'//char(10)//                             &
            'Values of the Pseudo-Velocity, the Rel. Displacement and the Equiv. Acceleration spectra'//char(10)// &
            'which exceed the limiting curve values are written to a file which has to be named after '//          &
            'pressing the 'Apply' button.'
      iw = winio@ ('%cn%^?8bt[Close]@',  do_on_close, hlp)
      end
!=================================================================================================================
      integer*4 function do_nothing()
!=================================================================================================================
      do_nothing = 2
      end
!=================================================================================================================
      integer*4 function do_on_close()
!=================================================================================================================
      do_on_close = 0
      end
!=======================================================================      
      resources
!=======================================================================
 1  24  default.manifest
13 Aug 2013 2:34 #12829

Yes. In the second Window you are getting both the native ClearWin+ tooltip and the Microsoft tooltip generated by an implied [ms_style].

You would get the same effect in the first Window if you used [balloon] or [ms_style] there.

Also [balloon] is only reading the fist line of the multiline tooltip.

Hopefully a fix won't be too long in coming.

13 Aug 2013 4:20 #12830

These bugs have been fixed in today's beta upload.

13 Aug 2013 6:45 #12833

Manfred,

[client_edge] looks good, doesn't it. Thanks for the tip, even though it doesn't do anything in your demo.

Another thing you get from the ENH file that doesn't appear in the CHM!

Eddie

13 Aug 2013 9:18 #12835

What controls how long a %th[balloon] help balloon displays for? Is there a setting corresponding to the delay before it appears?

14 Aug 2013 6:44 #12836

%th[balloon] implies %th[ms_style] and this uses TTM_SETDELAYTIME with TTDT_AUTOMATIC so the 'show' time is 10 times the initial delay time that can be set using %th[delay]. Currently ClearWin+ does not provide an independent way to set the 'show' time.

If you would like to set the show time independently then I could provide the tooltip hwnd via clearwin_info@ so that you could set the 'show' time via a single call to

SendMessage(hwnd, TTM_SETDELAYTIME, TTDT_AUTOPOP, milliSeconds)

14 Aug 2013 7:42 #12837

Paul,

I don't think it can possibly be a top priority, unless of course there are other things that can be done with a tooltip. I haven't assimilated %th[balloon] yet, and I think that the 10x start delay is a good choice - if the start delay is long! But what if he start delay is very short?

I have been reviewing some software (not FTN95 based) recently, and their tooltips pop up so fast that it gets in the way of using the program. In my view the delay sorts out the user who is merely dithering (UK meaning!) from one who doesn't know what the control does, so needs the help.

Can we therefore ask you to put this handle-finding job into your 'to-do' list, but with moderate to low priority please?

Eddie

Please login to reply.