I did some more digging based on your code, and discovered list
comprehensions. They didn't register the first time I skimmed the
language reference and tutorial. It's obvious the more I learn, the
more I need to relearn what I think I know. I need to study
comprehensions, but they open up l
William Gill wrote:
> Also, does 'row == var.get() for var in self.variables' perform the
> comparison row == var.get() for each item in self.variables? I would
> have had to write:
>
> for var in self.variables:
> return row == var.get()
Or rather
result = []
for var in self.variables:
p.s. I tweaked
rbn = tk.Radiobutton(self, text=text, variable=var, value=y)
to
rbn = tk.Radiobutton(self, text=text, variable=var, value=y+1)
and
return tuple(row == var.get() for var in self.variables)
to
return tuple(row+1 == var.get() for var in self.variables)
so that the Radiogri
> What follows looks more like a spec than a question.
It is, but I wanted to show why I was getting confused trying to use
control variables to maintain the overall relationship.
Thank you. This is exactly what I'm trying to do, and oddly enough
similar in concept to what I was doing, but fa
William Gill wrote:
> I thought the problem was practical, not philosophical, but what do I
> know I'm the one asking for help.
What follows looks more like a spec than a question.
>columns can have 0 or 1 selection
>rows can have 0,1,2,3, or 4 selections.
> Loop through the 4 i
I thought the problem was practical, not philosophical, but what do I
know I'm the one asking for help.
I have radiobuttons arranged in 4 rows of 4 buttons each ( 4 rows and 4
columns )
The user can select no more than 1 choice in any column, but any number
in any row.
Restated:
col
William Gill wrote:
> The radiobutton widget knows if it is selected or unselected, or it
> wouldn't be able to display correctly, but based on what I'm seeing,
> that information is inaccessable to the app. Instead the app must
> evaluate an associated control variable. That doesn't make sence
> or use a custom subclass ...
I had considered extending radiobutton to add whatever properties
needed, but the net/net is the same, that property must be set using
methods that trigger on the rb command procedure, or an external (to the
rb) control variable value.
The radiobutton widget kno
William Gill wrote:
> I am placing radiobuttons in a 4 X 4 matrix (using loops) and keep
> references to them in a 2 dimensional list ( rBtns[r][c] ). It works
> fine, and I can even make it so only one button per column can be
> selected, by assigning each column to an intVar. In many languages
>> to determine if it is selected?, or can this only be achieved via
>> control variables?
> The value and variable options for a radiobutton seem to be what
> you're looking for.
Thanks, I knew that, but I was looking for a way to read the
selected/unselected status directly. Using control
On Sat, 25 Jun 2005 19:34:50 GMT, William Gill <[EMAIL PROTECTED]> wrote:
> I am placing radiobuttons in a 4 X 4 matrix (using loops) and keep
> references to them in a 2 dimensional list ( rBtns[r][c] ). It works
> fine, and I can even make it so only one button per column can be
> selected, by
11 matches
Mail list logo