예제 #1
0
    bool SSearchDropdownList::OnEditNotify(EventArgs *e)
    {
        EventRENotify *pEvtNotify = sobj_cast<EventRENotify>(e);
        if(pEvtNotify->iNotify == EN_CHANGE)
        {
            if(!m_pDropDownWnd)
            {
                m_pDropDownWnd = new SDropdownList(this);
                m_pDropDownWnd -> Create(m_xmlDropdown.child(KNode_PopupStyle));
                SASSERT(m_pDropDownWnd);
            }

            EventFillSearchDropdownList evt(this);
            evt.strKey = sobj_cast<SEdit>(e->sender)->GetWindowText();
            evt.pDropdownWnd = m_pDropDownWnd;
            FireEvent(evt);
            
            if(evt.bPopup)
            {
                AdjustDropdownList();
            }else
            {
                CloseUp(IDCANCEL);
            }
        }
        return true;
    }
예제 #2
0
 BOOL SSearchDropdownList::FireEvent(EventArgs &evt)
 {
     if(wcscmp(evt.nameFrom,KName_ListView) == 0)
     {
         if(evt.GetID() == EVT_CMD)
         {
             CloseUp(IDOK);
             return TRUE;
         }
     }
     return __super::FireEvent(evt);
 }
예제 #3
0
//---------------------------------------------------------------------------
void __fastcall TRightsFrame::CMCancelMode(TCMCancelMode & Message)
{
  if (FPopup && Visible && !FPopingContextMenu &&
      ((Message.Sender == NULL) ||
       (!IsAncestor(Message.Sender, this) &&
        !IsAncestor(Message.Sender, FPopupParent) &&
        (Message.Sender != this))))
  {
    CloseUp();
  }
  TFrame::Dispatch(&Message);
}
예제 #4
0
//---------------------------------------------------------------------------
void __fastcall TRightsFrame::CMDialogKey(TCMDialogKey & Message)
{
  if (FPopup && Visible &&
      ((Message.CharCode == VK_RETURN) ||
       (Message.CharCode == VK_ESCAPE)) &&
      KeyDataToShiftState(Message.KeyData).Empty())
  {
    CloseUp();
    Message.Result = 1;
  }
  else
  {
    TFrame::Dispatch(&Message);
  }
}
예제 #5
0
	BOOL SComboBox::FireEvent( EventArgs &evt )
	{
		if(evt.idFrom == IDC_DROPDOWN_LIST && m_pDropDownWnd)
		{
			if(evt.GetID()==EventLBSelChanged::EventID)
			{
				OnSelChanged();
				return TRUE;
			}
			if(evt.GetID() == EventCmd::EventID)
			{
				CloseUp();
				return TRUE;
			}
		}
		return SComboBase::FireEvent(evt);
	}
예제 #6
0
 void SComboBase::OnKillFocus(SWND wndFocus)
 {
     __super::OnKillFocus(wndFocus);
     CloseUp();
 }
예제 #7
0
 void SComboBase::OnDestroy()
 {
     CloseUp();
     __super::OnDestroy();
 }