diff options
| author | 2023-04-12 04:51:19 +0200 | |
|---|---|---|
| committer | 2023-04-12 04:51:19 +0200 | |
| commit | ce8e92ca7a4ed0f4fe284c9042f863f7c83ba03a (patch) | |
| tree | f9be0c6e0d8f9e2af6170f4370677918c4b43a2a /examples/qr_code/src | |
| parent | ca828f03f5aab9efacc9d63d4149363333035a0c (diff) | |
| parent | 7e7e66586d990788ffd77b17e98357e74252f497 (diff) | |
| download | iced-ce8e92ca7a4ed0f4fe284c9042f863f7c83ba03a.tar.gz iced-ce8e92ca7a4ed0f4fe284c9042f863f7c83ba03a.tar.bz2 iced-ce8e92ca7a4ed0f4fe284c9042f863f7c83ba03a.zip  | |
Merge pull request #1744 from JungleTryne/disable-text-input
Add functionality to make `TextInput` disabled 
Diffstat (limited to 'examples/qr_code/src')
| -rw-r--r-- | examples/qr_code/src/main.rs | 12 | 
1 files changed, 5 insertions, 7 deletions
diff --git a/examples/qr_code/src/main.rs b/examples/qr_code/src/main.rs index d8041745..867ebfa4 100644 --- a/examples/qr_code/src/main.rs +++ b/examples/qr_code/src/main.rs @@ -49,13 +49,11 @@ impl Sandbox for QRGenerator {              .size(70)              .style(Color::from([0.5, 0.5, 0.5])); -        let input = text_input( -            "Type the data of your QR code here...", -            &self.data, -            Message::DataChanged, -        ) -        .size(30) -        .padding(15); +        let input = +            text_input("Type the data of your QR code here...", &self.data) +                .on_input(Message::DataChanged) +                .size(30) +                .padding(15);          let mut content = column![title, input]              .width(700)  | 
