Results 1 to 7 of 7

Thread: Bug: DbSuggestionForm display issue on dbViewToolPanel

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Mar 2009
    Location
    New Zealand
    Posts
    1,828

    Default Bug: DbSuggestionForm display issue on dbViewToolPanel

    Hi DAW

    If you have a DbSuggestionForm on dbViewToolPanel, then the SuggestionList popups behind the ToolPanel as the suggestion list attaches itself to the main panel rather than the active toolpanel.

    Problem is here within the cWinSuggestion.pkg (line 738)

    Code:
        { Visibility=Private }
        Function ParentForSuggestion Returns Handle
            Handle hoMain hoMainPanel
            
            // we must have an application object and a main panel object
            If ghoApplication Begin
                Get phoMainPanel of ghoApplication to hoMainPanel
            End
            If (hoMainPanel=0 or Self<=Desktop) Begin
                Function_Return 0
            End
            
            Move Self to hoMain
            Repeat
                Get Parent of hoMain to hoMain
            Until (hoMain=Desktop or Block_Mouse_State(hoMain) or hoMainPanel=hoMain) // <-- Does not check for ToolPanels
            
            Function_Return (If(hoMain>Desktop,hoMain,0))
            
        End_Function

    We are currently using this fix for suggestion forms within toolpanels:

    Code:
      Function ParentForSuggestion Returns Handle
          Handle  hoMain hoMainPanel
          Boolean bFound
          // we must have an application object and a main panel object
          If ghoApplication Begin
              Get phoMainPanel of ghoApplication to hoMainPanel
          End
          If (hoMainPanel=0 or Self<=Desktop) Begin
              Function_Return 0
          End
          
          Move Self to hoMain
          Repeat
              Get Parent of hoMain to hoMain
              
              Move (hoMain=Desktop) to bFound
              If (not(bFound)) Move (Block_Mouse_State(hoMain)) to bFound
              If (not(bFound)) Move (IsObjectOfClass(hoMain,RefClass(FloatingPanel))) to bFound  // FIX for ToolPanels
              If (not(bFound)) Move (hoMainPanel=hoMain) to bFound
          Until (bFound)
          
          Function_Return (If(hoMain>Desktop,hoMain,0))
          
      End_Function
    Hopefully this gets fixed in DF20.0

    Note: Obviously, we are not using the base dbViewToolPanel as its an abstract class, rather using a subclassed dbViewToolPanel that works as how a toolpanel should. Issue here is with the suggestion form.

    Thanks
    Last edited by raveens; 23-Feb-2021 at 06:34 PM. Reason: notes
    Regards,
    Raveen Sundram

    Software Development Manager
    Excellent Software Ltd
    Auckland, New Zealand
    www.helixretail.co.nz


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •