PlanetSquires Forums

Please login or register.

Login with username, password and session length
Advanced search  

Author Topic: Can FireFly User Tools menu be extended?  (Read 685 times)

John Montenigro

  • Senior Member
  • ***
  • Posts: 312
Can FireFly User Tools menu be extended?
« on: January 01, 2020, 12:16:13 AM »

I still depend heavily on Firefly (ver 3.70) for complex programs, and recently learned to add entries in the User Tools menu, which now includes a few tools and a bunch of HELP files for the various libraries I use.

It appears that FF can accept quite a few entries: my INI has slots up to "Tool100" (but I can't tell if it was distributed that way, or if I added them...)

But regardless of the INI...  The listview control in the User Tools edit panel can show as many as 20 entries before it adds scrollbars (so I know it can handle more), but the Tools menu-panel only shows 11 entries (and no scrollbars, etc.) ...

I've found nothing so far in the Help, examples, PB forums, or these forums, so: 
    Does anyone know how to increase the number of entries that can be viewed on the "Tools" menu drop-panel?


Paul Squires

  • Administrator
  • Guru Member
  • *****
  • Posts: 9313
  • Windows 10
    • PlanetSquires Software
Re: Can FireFly User Tools menu be extended?
« Reply #1 on: January 01, 2020, 07:35:41 AM »

I just looked at the old FireFly source code. You are correct that there is a maximum of 100 tools.

%MAX_USERTOOLS         = 100

You are also correct that only the first 11 will display in the top menu due to (if I remember correctly) not wanting a top menu that extended too long visually on the screen.

   hMenu = GetSubMenu(HWND_FRMMAIN_TOPMENU, 6)
   fShowSeparator = %FALSE
   For x = LBound(gUserTools) To 10 
      nMenuID = %IDM_USERTOOL + x
      If Len(Trim$(gUserTools(x).ToolName)) Then
         ' Add it To the menu
         If fShowSeparator = %FALSE Then
            AppendMenu hMenu, %MFT_SEPARATOR, %IDM_USERTOOLS_SEP, ""
            fShowSeparator = %TRUE
         End If
         sAccel = IIF$(gUserTools(x).Key_Ctrl, "Ctrl+", "")   & _
                  IIF$(gUserTools(x).Key_Alt,  "Alt+", "")    & _
                  IIF$(gUserTools(x).Key_Shift, "Shift+", "") & _
         AppendMenu hMenu, %MF_STRING, nMenuID, gUserTools(x).ToolName & $Tab & sAccel
      End If

I suggest that you move the User Tools that you use most to be within the top 10 so that they display, OR, assign accelerator keyboard shortcuts to them and activate them that way. At this point, I am not modifying FireFly source code or creating new FireFly exe's.

Paul Squires
PlanetSquires Software
WinFBE Editor and Visual Designer

John Montenigro

  • Senior Member
  • ***
  • Posts: 312
Re: Can FireFly User Tools menu be extended?
« Reply #2 on: January 01, 2020, 12:45:51 PM »

Hi Paul, and thanks for the fast reply and specific info, which is of a certain kind of interest. I can always learn from expert code!

I appreciate your checking out the code and verifying my observations, especially on New Year's Eve!
I'm going to play with having the first 11 items in view on the menu, and the rest on accelerator keys, and see how that goes.

I completely understand that FF is no longer being updated, and it's not a problem. In fact, I hope you know that what you created STILL serves well and continues to be appreciated.

Thanks again for everything Firefly, and have a fabulous New Year!