I'm using Delphi XE2 and I'm having an issue where upon selecting an option from a DBLookupCombo box a modal dialog will display.
However a problem is occurring whereby when the modal dialog is displayed, the LookupCombo will remain on top of the Modal Dialog.
It's only a minor cosmetic issue but it's driving me mad. Programatically using 'SendToBack' on the combo has no effect.
Is there anything else I can do with regards to this issue?
Code Snippet:
else if (getUserName <> cboUserName.Text) and (userHasPerm2 = 1) then
begin
ValidUser := false;
frmValidateUser := TfrmValidateUser.Create(self);
frmValidateUser.txtUsername.ReadOnly := true;
frmValidateUser.txtUsername.enabled := false;
frmValidateUser.FormStyle := fsStayOnTop;
cboUsername.SendToBack;
frmValidateUser.ShowModal;
So if the user selected isn't the logged in user and doesn't have appropriate permissions, the ValidateUser form will display modally. As you can see I've tried setting the from style to 'stay on top' and the combobox to 'sendtoback' without success.
SendToBack
only changes the order of components within a parent component, i.e. aTForm
. Does clicking 1. the ComboBox and 2. the ModalDialog change something? Is the Combobox still active - can you change it while the ModalDialog is visible?