[]
        
(Showing Draft Content)

Popup 메서드 사용

Wijmo에는 wijmo.input 모듈의 일부인 Popup 컨트롤이 있습니다. 컨트롤 외에도 Wijmo core는 원하는 콘텐츠가 포함된 팝업을 표시하거나 숨길 수 있는 몇 가지 방법을 제공합니다. 이러한 메서드는 Pop 컨트롤에 연결되지 않습니다. 모든 HTML 요소와 함께 사용할 수 있습니다.

메서드는 간단합니다:

  • showPopup()
  • hidePopup()

표시(Show)

팝업을 표시하려면, HTML 요소를 인수로 전달해야 합니다. 이 HTML은 표시하려는 팝업입니다.

예를 들어 __ListBox__와 같은 컨트롤을 팝업으로 표시하려면, 컨트롤 템플릿을 만들고 컨트롤을 인스턴스화 해야 합니다. 그런 다음 이를 인수로 전달하는 showPop 메서드를 호출할 수 있습니다.

예시
import * as wijmo from '@grapecity/wijmo';
import * as wjInput from '@grapecity/wijmo.input';

let listbox = new wjInput.ListBox('#myListbox', {
    itemsSource: data,
    checkedMemberPath: 'visible',
    displayMemberPath: 'country'
});

...
// Show the popup
wijmo.showPopup(listbox.hostElement);

숨김(Hide)

Popup을 숨기기 위해선, HTMLElement를 인수로 사용하여 hidePopup 메서드를 호출합니다.

o hide the Popup, invoke the hidePopup method with the HTMLElement passed as the argument.

// Hide the popup
wijmo.hidePopup(listbox.hostElement);