-
Notifications
You must be signed in to change notification settings - Fork 547
How to access the e.control's parent? #3340
-
QuestionI'm newbie to Flet and I'm facing a problem. Code sampleColumn(
[
Row(
[
Text("0", size=18, font_family="InterMedium"),
Dropdown(
options=[
dropdown.Option("Nothing"),
dropdown.Option("Digital Device"),
dropdown.Option("LED"),
dropdown.Option("REV Touch Sensor")
],
value="Nothing",
on_change=configuration_dropdown_changed
)
]
),
TextField(label="Enter a device name")
]
) Error messageNo response ------------------------------------------------------
|
Beta Was this translation helpful? Give feedback.
All reactions
Replies: 1 comment · 7 replies
-
|
Beta Was this translation helpful? Give feedback.
All reactions
-
There will be a lot of code here, probably not very good, but it works like this: I have 3 tabs, a window with two containers pops up on the second tab. In the first container I select the device, in the second container I select the device category to configure. And after that, instead of selecting a device, a large column appears in which there are ports for connecting devices, Dropdowns in which you can select a specific type of device, and a text field in which you can enter the name of the device. Initially, this text field is disabled, but I need to check if Dropdown does not have a value of Nothing in the corresponding port, then the text field should be enabled. I guess this can be done if I get access to the parent of this Dropdown, but maybe it's not. Variable:
Column and container system:
It's how this code working:_2024_05_24_20_52_55_77.mp4 |
Beta Was this translation helpful? Give feedback.
All reactions
-
Sorry but I wont be able to look at it. |
Beta Was this translation helpful? Give feedback.
All reactions
-
👀 1
-
Try running the following code:
Code
|
Beta Was this translation helpful? Give feedback.
All reactions
-
I get Row printed out, which is correct. |
Beta Was this translation helpful? Give feedback.
All reactions
-
I do not know why Flet did not update before the discussion opened, but I decided to try again, and it worked! Thank you so much for your responsiveness and I'm sorry that I had to come all this way to solve such a ridiculous problem. |
Beta Was this translation helpful? Give feedback.
All reactions
-
😄 1
I get Row printed out, which is correct.
Please update your Flet version to the latest.