[progress Communities] [progress Openedge Abl] Forum Post: Functions Keys Stop Working When...

  • Thread starter Thread starter Larry Reed
  • Start date Start date
Status
Not open for further replies.
L

Larry Reed

Guest
We are using Progress 11.5.1.011 64 bit with the Infragistics controls and are using SmartComponents from Consultingwerk. Our application has all our functions (forms) opening as mdichild forms inside our main menu form. We are using the Infragistics UltraToolBarsManager in our forms with some button tools. We have "MdiMergeable" set to true so we can have the ribbon from the individual forms merge with the main menu ribbon. We've also mapped all of the buttons to Function keys. The "Add" button is mapped to "F5", Save is mapped to "F2", etc. These all work fine when the form is first opened as an mdichild. When we undock the form, the function keys stop working. Has anyone run into this kind of behavior? This is some of the code that is in our DphsWindowForm which we use as a base for all the forms. Basically in the Onload of the form we're running a method to map the function keys to the buttons. When we un-dock the form we are running the same code to reset the function keys. Onload only runs when the form is initially opened and not when it's docked or undocked and we thought the functions keys needed to be remapped. I'm not sure what other specifics would be helpful. Mostly wondering if anyone has run into this kind of issue before. METHOD PROTECTED OVERRIDE VOID OnLoad (e AS System.EventArgs ): /* this is how we would set the shortcut key for buttons. We need to add the specific "Key" values for the buttons in the case statement along with the shortcut key */ THIS-OBJECT :SetShortcutKeys(oToolbarController). END METHOD . METHOD PUBLIC VOID SetShortcutKeys(poToolbarController AS Infragistics.Win.UltraWinToolbars.UltraToolbarsManager ): IF VALID-OBJECT (poToolbarController) THEN DO : SetShortcut ( "TableIOSave" , System.Windows.Forms.Shortcut:F2, poToolbarController). SetShortcut ( "TableIOCopy" , System.Windows.Forms.Shortcut:F4, poToolbarController). SetShortcut ( "TableIOAdd" , System.Windows.Forms.Shortcut:F5, poToolbarController). SetShortcut ( "TableIODelete" , System.Windows.Forms.Shortcut:F6, poToolbarController). SetShortcut ( "TableIOUpdate" , System.Windows.Forms.Shortcut:F8, poToolbarController). SetShortcut ( "TableIOCancel" , System.Windows.Forms.Shortcut:F10, poToolbarController). END . /* if valid-object toolbarcontroller */ Reset the function key mapping when form is undocked METHOD PRIVATE VOID ToolbarToolClickHandler (sender AS System.Object, e AS Infragistics.Win.UltraWinToolbars.ToolClickEventArgs): CASE e:Tool: Key : WHEN "Undock" :U THEN DO : IF e:tool:SharedProps:Caption = "UnDock Form" THEN DO : /* this doesn't appear to be working properly. We think it's too early and that the tool bar for the undocked form isn't there yet but not sure where to put this. */ IF TYPE-OF (sender, Consultingwerk.SmartComponents.Implementation.SmartToolbarController) THEN oToolbarController = CAST (sender, Consultingwerk.SmartComponents.Implementation.SmartToolbarController). ELSE oToolbarController = Infragistics.Win.UltraWinToolbars.UltraToolbarsManager:FromForm ( THIS-OBJECT ) . THIS-OBJECT :SetShortcutKeys(oToolbarController). END . END CASE . END METHOD .

Continue reading...
 
Status
Not open for further replies.
Back
Top