View previous topic :: View next topic |
Author |
Message |
PaulLaidler Site Admin
Joined: 21 Feb 2005 Posts: 7925 Location: Salford, UK
|
Posted: Mon Jun 24, 2013 12:24 pm Post subject: |
|
|
Detlef
When I have finished (hopefully later today) you will be able to change %mn and %pm menus on the fly (with or without %em). Also you can now use UTF-8 characters for non-ASCII text with a call to enable_utf8@(1). |
|
Back to top |
|
|
dpannhorst
Joined: 29 Aug 2005 Posts: 165 Location: Berlin, Germany
|
Posted: Mon Jun 24, 2013 6:28 pm Post subject: |
|
|
Hi Eddie,
this is exactly what I'm doing. But the user can change the language from a configuration menu and all the menus are updated to the new language by calling REPLACE_ENHANCED_MENU@ on the fly. You can check this by downloading and installing my program NETDRAW (a graphical editor for electrical networks and controllers) from www.netdraw.de.
Detlef |
|
Back to top |
|
|
dpannhorst
Joined: 29 Aug 2005 Posts: 165 Location: Berlin, Germany
|
Posted: Mon Jun 24, 2013 6:29 pm Post subject: |
|
|
Hi Paul,
this sounds very good. I will try it as soon as the new version will be available.
Detlef |
|
Back to top |
|
|
PaulLaidler Site Admin
Joined: 21 Feb 2005 Posts: 7925 Location: Salford, UK
|
Posted: Mon Jun 24, 2013 7:05 pm Post subject: |
|
|
I have uploaded a new beta with two fixes and some new features that are described in the enclosed enh file. |
|
Back to top |
|
|
dpannhorst
Joined: 29 Aug 2005 Posts: 165 Location: Berlin, Germany
|
Posted: Wed Jun 26, 2013 8:05 am Post subject: |
|
|
Paul,
the following menu string leads to a problem:
Code: | RC=WINIO@('%em[W8]&')
RC=WINIO@('%mn[Edit[Undo (Delete/Move)]]',M_UNDO)
|
The slash in the menu string lets Clearwin search for an icon "Undo (Delete".
Without %em it is working well.
Detlef |
|
Back to top |
|
|
PaulLaidler Site Admin
Joined: 21 Feb 2005 Posts: 7925 Location: Salford, UK
|
Posted: Wed Jun 26, 2013 2:15 pm Post subject: |
|
|
If you need to use the slash as a character then we need a way around this.
Any suggestions? A double slash is already in use. |
|
Back to top |
|
|
PaulLaidler Site Admin
Joined: 21 Feb 2005 Posts: 7925 Location: Salford, UK
|
Posted: Wed Jun 26, 2013 2:22 pm Post subject: |
|
|
I have upload another beta update of salflibc.dll.
This one introduces another significant new feature so it should be considered as experimental. Make sure you have a backup before replacing the DLL.
I have introduced another format code (%nw) and this allows you to update existing menus. It also allows you to attach popup menus to given controls. |
|
Back to top |
|
|
dpannhorst
Joined: 29 Aug 2005 Posts: 165 Location: Berlin, Germany
|
Posted: Wed Jun 26, 2013 2:28 pm Post subject: |
|
|
Hi Paul,
maybe a backslash for the separation of icon name and menu string would have been better. Since it is still a beta version this change could be possible?
Detlef |
|
Back to top |
|
|
PaulLaidler Site Admin
Joined: 21 Feb 2005 Posts: 7925 Location: Salford, UK
|
Posted: Wed Jun 26, 2013 2:40 pm Post subject: |
|
|
I think that I can probably remove the failure message and use the string when the icon resource cannot be found. |
|
Back to top |
|
|
PaulLaidler Site Admin
Joined: 21 Feb 2005 Posts: 7925 Location: Salford, UK
|
Posted: Wed Jun 26, 2013 3:14 pm Post subject: |
|
|
I have made this change and done another beta upload. |
|
Back to top |
|
|
dpannhorst
Joined: 29 Aug 2005 Posts: 165 Location: Berlin, Germany
|
Posted: Wed Jun 26, 2013 4:14 pm Post subject: |
|
|
Thanks Paul! It is working now.
Detlef |
|
Back to top |
|
|
Borrmann Manfred
Joined: 29 Mar 2007 Posts: 28
|
Posted: Thu Jul 11, 2013 10:13 am Post subject: |
|
|
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:
Code: | 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
|
|
|
Back to top |
|
|
LitusSaxonicum
Joined: 23 Aug 2005 Posts: 2388 Location: Yateley, Hants, UK
|
Posted: Thu Jul 11, 2013 11:43 am Post subject: |
|
|
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:
Code: | 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 |
|
Back to top |
|
|
PaulLaidler Site Admin
Joined: 21 Feb 2005 Posts: 7925 Location: Salford, UK
|
Posted: Thu Jul 11, 2013 12:22 pm Post subject: |
|
|
Not sure what is happening here.
I will have to log this for further investigation. |
|
Back to top |
|
|
LitusSaxonicum
Joined: 23 Aug 2005 Posts: 2388 Location: Yateley, Hants, UK
|
Posted: Thu Jul 11, 2013 12:44 pm Post subject: |
|
|
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 |
|
Back to top |
|
|
|