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