Skip to content

Missing feature: generic configure/cget for tk::Widget<Inst> #22

Description

@RobertPHeller

If one has a frame (or really any container widget) that contains a bunch of button widgets, and one ones to enable or disable those button features, with real Tcl/Tk one can do something like

foreach b [winfo children .frameofbuttons] {
    $b configure -state $someState
}

In rust the obvious code would be comething like

for b in frame.winfo_children()?.iter() {
    b.configure(-state(somestate))?;
}

But this does not work, because b is a tk::Widget, not something like TtkButton (or any of the other possible button widgets). There also does not seem to be any way to go from a generic tk::Widget to a specific widget type. There is a hole here. (Yes, rust does not do polymorphism -- which also sucks).

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions