Skip to content
Tcl Source Code History Of Ticket 454267ffffffffffffffffffffffffffffffffff
Login

History Of Ticket 454267ffffffffffffffffffffffffffffffffff

Artifacts Associated With Ticket 454267ffffffffffffffffffffffffffffffffff

  1. Ticket change [8228f2d55e] (rid 117180) by nobody on 2001-08-22 16:51:13:

    1. assignee initialized to: "dkf"
    2. cmimetype initialized to: "text/plain"
    3. comment initialized to:
      I was looking for a justify option in the TCL8.3/8.4 
      listbox command and I found this old patch by Robin 
      Becker.
      This allows tk8.0 to show a "-justify" options to 
      align the listbox content to left/center/right.
      Unfortunately I haven't the necessary knowledge 
      neither to judge if it is still a good patch for the 
      new tcl releases, nor to put my hands on the TclTk 
      source code.
      
      This is the patch as I found it on 
      
      http://www.jessikat.demon.co.uk/tkLB8.patch
      
      Stefano Federici
      [email protected]
      
      =================LISTBOX PATCH====================
      
      *** tkListbox.c.orgSat Jan 18 23:54:36 1997
      --- tkListbox.cSun Jan 19 00:04:46 1997
      ***************
      *** 167,172 ****
      --- 167,173 ----
            char *xScrollCmd;/* Command prefix for 
      communicating with
         * horizontal 
      scrollbar.  NULL means no command
         * to issue.  
      Malloc'ed. */
      +     int justify;/* justification 
      option */
            int flags;/* Various 
      flag bits:  see below for
         * definitions. */
        } Listbox;
      ***************
      *** 259,264 ****
      --- 260,267 ----
            {TK_CONFIG_STRING, "-
      yscrollcommand", "yScrollCommand", "ScrollCommand",
        DEF_LISTBOX_SCROLL_COMMAND, Tk_Offset(Listbox, 
      yScrollCmd),
        TK_CONFIG_NULL_OK},
      +     {TK_CONFIG_JUSTIFY, "-
      justify", "justify", "Justify",
      + "left", Tk_Offset(Listbox, justify), 
      TK_CONFIG_NULL_OK},
            {TK_CONFIG_END, (char *) NULL, (char *) NULL, 
      (char *) NULL,
        (char *) NULL, 0, 0}
        };
      ***************
      *** 415,420 ****
      --- 418,424 ----
            listPtr->takeFocus = NULL;
            listPtr->xScrollCmd = NULL;
            listPtr->yScrollCmd = NULL;
      +     listPtr->justify = TK_JUSTIFY_LEFT;
            listPtr->flags = 0;
        
            Tk_SetClass(listPtr->tkwin, "Listbox");
      ***************
      *** 1188,1195 ****
        }
        Tk_GetFontMetrics(listPtr->tkfont, &fm);
        y += fm.ascent + listPtr->selBorderWidth;
      ! x = listPtr->inset + listPtr->selBorderWidth - 
      elPtr->lBearing
      ! - listPtr->xOffset;
        Tk_DrawChars(listPtr->display, pixmap, gc, 
      listPtr->tkfont,
        elPtr->text, elPtr->textLength, x, y);
        
      --- 1192,1206 ----
        }
        Tk_GetFontMetrics(listPtr->tkfont, &fm);
        y += fm.ascent + listPtr->selBorderWidth;
      ! if (listPtr->justify == TK_JUSTIFY_LEFT) {
      ! x = listPtr->inset + listPtr-
      >selBorderWidth - elPtr->lBearing
      ! - listPtr->xOffset;
      ! } else if (listPtr->justify == 
      TK_JUSTIFY_CENTER) {
      ! x = listPtr->selBorderWidth - elPtr-
      >lBearing
      ! - listPtr->xOffset + (Tk_Width
      (tkwin) - elPtr->pixelWidth) / 2;
      ! } else {
      ! x = Tk_Width(tkwin) - 2*listPtr-
      >inset - elPtr->pixelWidth;
      ! }
        Tk_DrawChars(listPtr->display, pixmap, gc, 
      listPtr->tkfont,
        elPtr->text, elPtr->textLength, x, y);
        
      
      
      
    4. foundin initialized to: "obsolete: 8.4a4"
    5. priority initialized to: "5 Medium"
    6. resolution initialized to: "None"
    7. status initialized to: "Open"
    8. submitter initialized to: "nobody"
    9. subsystem initialized to: "17. Commands I-L"
    10. title initialized to: "listbox enhancement"
    11. type initialized to: "Bug"
  2. Ticket change [4119c9cf86] (rid 116125) by dgp on 2001-08-23 01:04:18:

    1. assignee changed to: "dgp"
    2. closedate changed to: "2001-08-22T18:04:18"
    3. closer changed to: "dgp"
    4. icomment:
      Logged In: YES 
      user_id=80530
      
      
      This patch is for Tk, not Tcl.  Please make your
      request to the Tk toolkit project.
      
      http://sf.net/projects/tktoolkit/
      
      
    5. login: "dgp"
    6. mimetype: "text/plain"
    7. resolution changed to: "Invalid"
    8. status changed to: "Closed"
    9. subsystem changed to: "None"
    10. username: "dgp"