# AutoCompleteBoxQuerySubmittedEventArgs

Version: 0.5.0
Framework commit: d503df2befa756e681fcdc6250e9552dc7388bea
Canonical URL: /docs/0.5.0/api/ferroui-controls/struct-autocompleteboxquerysubmittedeventargs/

**struct** · [`ferroui-controls`](/docs/0.5.0/api/ferroui-controls/) · v0.5.0

```rust
struct AutoCompleteBoxQuerySubmittedEventArgs
```

Provides data for the `QuerySubmitted` event of the `AutoCompleteBox`:
the text of the box when Enter submitted it, and the suggestion that Enter chose from the open
drop-down, if any.

[View source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/auto_complete_box/query_submitted_event_args.rs#L13)

## Members

- [`new`](#function-new)
- [`query_text`](#function-query_text)
- [`chosen_suggestion`](#function-chosen_suggestion)

<a id="function-new"></a>

### new

```rust
fn new<T: ?Sized>(routed_event: Option<&RoutedEvent<T>>, query_text: String, chosen_suggestion: Option<BoxedValue>) -> Self
```

Creates args for a routed event, the submitted text and the chosen suggestion.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/auto_complete_box/query_submitted_event_args.rs#L23)

<a id="function-query_text"></a>

### query_text

```rust
fn query_text(self: &Self) -> &str
```

The text of the box when the query was submitted.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/auto_complete_box/query_submitted_event_args.rs#L34)

<a id="function-chosen_suggestion"></a>

### chosen_suggestion

```rust
fn chosen_suggestion(self: &Self) -> Option<&BoxedValue>
```

The item chosen from the open drop-down by the Enter that submitted the query; `None` when
the drop-down was closed or nothing was selected in it.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/auto_complete_box/query_submitted_event_args.rs#L40)

## Trait implementations

- `Send`
- `Sync`
- `Freeze`
- `UnsafeUnpin`
- `Unpin`
- `UnwindSafe`
- `RefUnwindSafe`
- `Borrow<T>`
- `BorrowMut<T>`
- `CloneToUninit`
- `Into<U>`
- `From<T>`
- `TryInto<U>`
- `TryFrom<U>`
- [`Receiver`](/docs/0.5.0/api/ferroui-system/task/oneshot/struct-receiver/)
- `Any`
- `ToOwned`
- [`ClassDefaults`](/docs/0.5.0/api/ferroui-base/trait-classdefaults/)
- `ErasedDestructor`
- `IntoEither`
- `Clone`
- `Deref`
- [`IRoutedEventArgs`](/docs/0.5.0/api/ferroui-base/interactivity/trait-iroutedeventargs/)

## Availability

Extracted for `aarch64-apple-darwin`. Cargo features are listed in the [crate index](/docs/0.5.0/api/).
