Hello and I hope someone can help me. I am really at wits end.
When I activate the pane I set all controls behind it to be invisible. When I deactivate I tell it to make all controls behind it to be visible.
However, if I should click the start menu button while the pane is activated all the controls behind it return to the visible state. How do I fix this? I've tried addressing the form deactivate, isvisible and LostFocus events (If MakeVisible = False then make these controls invisible) with the same logic in the PaneActivate and PaneDeactivate events to no avail.
Public MakeVisible As Boolean = True
MakeVisible = False
Me.Panel1.Visible = False
Me.pnlCheckBoxes.Visible = False
Me.lstColumns.Visible = False
Me.Label45.Visible = False
Me.cbSortChecked.Visible = False
Me.btnCheckedFieldForSortAdd.Visible = False
Me.btnChangeColumnOrder.Visible = False
Me.btnEmployeeDone.Visible = False
Me.btnResetSQL.Visible = False
Me.tbQueryText.Visible = False
Me.Button2.Visible = False
Me.Button3.Visible = False
Label60.Visible = False
Me.cbLeftDropDown.Visible = False
Me.Label61.Visible = False
Me.cbRightDropDown.Visible = False
Me.Label59.Visible = False
Me.chkEffectiveDating.Visible = False
Me.DateTimePickerEffectiveDate.Visible = False
End Sub
MakeVisible = True
Me.Panel1.Visible = True
Me.pnlCheckBoxes.Visible = True
Me.lstColumns.Visible = True
Me.Label45.Visible = True
Me.cbSortChecked.Visible = True
Me.btnCheckedFieldForSortAdd.Visible = True
Me.btnChangeColumnOrder.Visible = True
Me.btnEmployeeDone.Visible = True
Me.btnResetSQL.Visible = True
Me.tbQueryText.Visible = True
Me.Button2.Visible = True
Me.Button3.Visible = True
Label60.Visible = True
Me.cbLeftDropDown.Visible = True
Me.Label61.Visible = True
Me.cbRightDropDown.Visible = True
Me.Label59.Visible = True
Me.chkEffectiveDating.Visible = True
Me.DateTimePickerEffectiveDate.Visible = True
You can try using the PaneHidden and PaneDisplayed events instead. Unlike the PaneDeactivate, the PaneHidden event will not be fired when the application loses focus.
I don't show a PaneHidden or PaneDisplayed event in the event dropdown for UDM?
What version are you using? I believe these events were added in version 6.3.
Quite right of course. My challenge was to find a way to circumvent that process. I attempted a boolean value to prevent the deactivate event from firing but of course that did not work. Looks like I am heading down a path of opening the results in a seperate tab. I think it will be the best I can do until they upgrade. By the way, thank you much for going through this with me. I have always thought highly of INfragistics and this little issue was giving me fits.
I am a little confused. I realize the other controls normally would have nothing to do with the pane, but isn't your PaneDeactivated event handler changing the visibility of those other controls. If so, that event handler is creating a relationship between the panes active state and those other controls. If the pane was active when the Form was active and the Form is deactivated, a PaneDeactivated event will be fired for that pane and your event handler will be called, which will hide the other controls.
The issue here which is not by design is why do other controls, after the pane is activated, change their visible status if the form loses focus. It is odd that it would impact another controls who have nothing do with the pane. I am obviously surprised.
I am wondering if I create a label at runtime that covers the whole of the form that hides the controls when the pane is activated. Instead of making them invisible I simply cover them. I don't know.
I can't think of another way to implement this correctly without those events. And it is by design that the PaneActivate and PaneDeactivate events respond to form activation.