From: Paul Mackerras Date: Thu, 06 Mar 2008 10:30:42 GMT Subject: Re: [PATCH] gitk: Add horizontal scrollbar to the diff view Message-ID: <18383.51154.695501.543720@cargo.ozlabs.ibm.com> In-Reply-To: <7vy78wgyu1.fsf@gitster.siamese.dyndns.org> Junio C Hamano writes: > An obvious solution is to show the scrollbar on-demand (i.e. when the > lines are overlong), but I do not talk Tcl/Tk and do not know if you can > do that easily. I don't know of any extremely easy way to do it; it's certainly possible, but I think I would have to calculate the length of each line as it is put in, so as to get the maximum, and then have a handler for when the pane is resized, and pack and unpack the scrollbar as necessary. I think it's reasonable to have the scroll bar there always. I think that pane could look better using the grid geometry manager (instead of pack), but that can be a separate patch. Paul.