R
Ronny
Problem: My window should consists of several lines. Each line consists
of
- a checkbox
- a label
- an entry field
I used the following approach (which works basically well - but see
below):
# Code for adding one line to the root window:
frame=TkFrame.new(root)
frame.pack()
check=TkCheckButton.new(frame).pack("side" => "left")
label=TkLabel.new(frame) { text "...." }
label.pack("side" => "left")
entry=TkEntry.new(frame).pack("side" => "left")
entry.value="...."
Now the problem is that since the label texts and initial values for
each line are of
different size, and since by default the frame is centered within the
root window,
the check buttons turn out to be not lined up one below the other,
which gives an ugly look.
I tried to remedy this by changing the first statement to
frame=TkFrame.new(root) { justify 'left' }
but this does not work, because "justify" is not valid for a TkFrame.
Any idea how to solve this? Since it is so common to have lined up
checkboxes
one below the other, I guess there must be an easy solution to this,
but I don't
see how...
Ronald
PS: As always, other types of critics to my code, as well as hints of
where on the I could
have found the information I'm looking for, are welcome.
of
- a checkbox
- a label
- an entry field
I used the following approach (which works basically well - but see
below):
# Code for adding one line to the root window:
frame=TkFrame.new(root)
frame.pack()
check=TkCheckButton.new(frame).pack("side" => "left")
label=TkLabel.new(frame) { text "...." }
label.pack("side" => "left")
entry=TkEntry.new(frame).pack("side" => "left")
entry.value="...."
Now the problem is that since the label texts and initial values for
each line are of
different size, and since by default the frame is centered within the
root window,
the check buttons turn out to be not lined up one below the other,
which gives an ugly look.
I tried to remedy this by changing the first statement to
frame=TkFrame.new(root) { justify 'left' }
but this does not work, because "justify" is not valid for a TkFrame.
Any idea how to solve this? Since it is so common to have lined up
checkboxes
one below the other, I guess there must be an easy solution to this,
but I don't
see how...
Ronald
PS: As always, other types of critics to my code, as well as hints of
where on the I could
have found the information I'm looking for, are welcome.