共用方式為


CoreTextEditContext.TextRequested 事件

定義

發生于文字輸入伺服器需要從文字輸入控制項取得文字範圍時。 應用程式應該處理此事件,並傳回所要求的範圍。

// Register
event_token TextRequested(TypedEventHandler<CoreTextEditContext, CoreTextTextRequestedEventArgs const&> const& handler) const;

// Revoke with event_token
void TextRequested(event_token const* cookie) const;

// Revoke with event_revoker
CoreTextEditContext::TextRequested_revoker TextRequested(auto_revoke_t, TypedEventHandler<CoreTextEditContext, CoreTextTextRequestedEventArgs const&> const& handler) const;
public event TypedEventHandler<CoreTextEditContext,CoreTextTextRequestedEventArgs> TextRequested;
function onTextRequested(eventArgs) { /* Your code */ }
coreTextEditContext.addEventListener("textrequested", onTextRequested);
coreTextEditContext.removeEventListener("textrequested", onTextRequested);
- or -
coreTextEditContext.ontextrequested = onTextRequested;
Public Custom Event TextRequested As TypedEventHandler(Of CoreTextEditContext, CoreTextTextRequestedEventArgs) 

事件類型

適用於