Professional Web Applications Themes

Differences observed with TclTkAqua v8.4.5 (on MacOSX) - Mac Programming

Hello, When the appended code is fed to wish under TclTk v8.3 on Linux, it works as I would expect - I can set the background colour and font of both buttons and menubuttons. However, when I run this with TclTkAqua v8.4.5 on MacOSX 10.3, I: - cannot set the background colour of buttons - cannot set the font of menubuttons - cannot set the background colour of menu command items Is this a known/observed problem with TclTkAqua, or an (incomplete) attempt by TclTkAqua to enforce an Aqua look-and-feel ? Thanks, __________________________________________________ _____________________________ Dr Chris McDonald EMAIL: uwa.edu.au School of ...

  1. #1

    Default Differences observed with TclTkAqua v8.4.5 (on MacOSX)

    Hello,

    When the appended code is fed to wish under TclTk v8.3 on Linux,
    it works as I would expect - I can set the background colour and font of
    both buttons and menubuttons.

    However, when I run this with TclTkAqua v8.4.5 on MacOSX 10.3, I:

    - cannot set the background colour of buttons
    - cannot set the font of menubuttons
    - cannot set the background colour of menu command items

    Is this a known/observed problem with TclTkAqua, or an (incomplete)
    attempt by TclTkAqua to enforce an Aqua look-and-feel ?

    Thanks,

    __________________________________________________ _____________________________
    Dr Chris McDonald EMAIL: uwa.edu.au
    School of Computer Science & Software Engineering
    The University of Western Australia WWW: http://www.csse.uwa.edu.au/~chris
    Crawley, Western Australia, 6009 PH: +61 8 6488 2533, FAX: +61 8 6488 1089


    #
    # The following constants may be safely modified:
    #
    if { $tcl_platform(os) == "Darwin" } {
    set buttonfont "Lucinda 24"
    set stdbg yellow
    } else {
    set buttonfont "-adobe-helvetica-medium-r-*-*-24-*-*-*-*-*-*-*"
    set stdbg yellow
    }

    # ----------------------------------------------------------------

    set w .try
    toplevel $w
    wm withdraw .
    wm protocol $w WM_DELETE_WINDOW exit
    wm resizable $w 0 0

    set f [frame $w.title]
    button $f.exit -text "Exit try" \
    -background $stdbg \
    -font $buttonfont \
    -command exit

    menubutton $f.menu -text "Select" \
    -background $stdbg \
    -font $buttonfont \
    -indicatoron true \
    -direction flush

    set m [menu $f.menu.popup]
    $m configure -tearoff false
    $m add command \
    -background $stdbg \
    -font $buttonfont \
    -label "menu item 1" \
    -command { puts "selected 1" }
    $m add command \
    -background $stdbg \
    -font $buttonfont \
    -label "menu item 2" \
    -command { puts "selected 2" }

    $f.menu configure -menu $m

    pack $f.exit $f.menu -side left -fill both -expand yes
    pack $f
    Chris Guest

  2. #2

    Default Re: Differences observed with TclTkAqua v8.4.5 (on MacOSX)

    Chris McDonald wrote: 

    Incomplete? I do believe that it is the latter. Ever since native
    widgets have been used in Tk (since 8.0), platforms where such a
    thing can be called native (Windows and Mac) have allowed ignoring
    some options to comply with the native look and feel. For example,
    you can't set the background of menus, the scrollbar and a few other
    things on Windows. I do know that OS X also doesn't allow multiline
    buttons either, as that is a restriction imposed by the OS X toolkit.

    --
    Jeff Hobbs, The Tcl Guy
    http://www.ActiveState.com/, a division of Sophos
    Jeff Guest

  3. #3

    Default Re: Differences observed with TclTkAqua v8.4.5 (on MacOSX)

    Jeff Hobbs <com> writes:
     [/ref]
     


    Thanks for the information/clarification, Jeff.
    I'm obviously a newbie in porting my Tcl/Tk application to MacOSX,
    and have some respect for trying to maintain a consistent look-and-feel,
    but would have hoped for this enforcement to be consistent.

    I guess the strategy that I should adopt is to first create widgets
    whose appearance cannot be changed, capture the font/background/colour
    attributes of those widgets, and then use those attributes to set other
    widgets. With that approach I should be able to develop some more
    portable Tcl/Tk code.

    __________________________________________________ _____________________________
    Dr Chris McDonald EMAIL: uwa.edu.au
    School of Computer Science & Software Engineering
    The University of Western Australia WWW: http://www.csse.uwa.edu.au/~chris
    Crawley, Western Australia, 6009 PH: +61 8 6488 2533, FAX: +61 8 6488 1089
    Chris Guest

  4. #4

    Default Re: Differences observed with TclTkAqua v8.4.5 (on MacOSX)

    Chris McDonald <uwa.edu.au> writes:

    ........
     


    Well, so much for my own brilliant idea.
    It appears that if you query the font of a, say, menubutton, that the
    menubutton indicates that the *requested* font *is* being used,
    and does not return the *actual* font being used.

    __________________________________________________ _____________________________
    Dr Chris McDonald EMAIL: uwa.edu.au
    School of Computer Science & Software Engineering
    The University of Western Australia WWW: http://www.csse.uwa.edu.au/~chris
    Crawley, Western Australia, 6009 PH: +61 8 6488 2533, FAX: +61 8 6488 1089
    Chris Guest

  5. #5

    Default Re: Differences observed with TclTkAqua v8.4.5 (on MacOSX)

    Chris McDonald <uwa.edu.au> wrote in message news:<c0e1ft$e88$uwa.edu.au>... 

    Some of those are known (although perhaps not doented) limitations
    of TkAqua which are unlikely to be fixed, but others are things that
    simply haven't been implemented. For example there is pretty
    extensive support for configuring fonts, etc of menu entries/commands
    in the OS (I think), but TkAqua doesn't do it. Such cases should
    probably be considered bugs which need fixing.

    Hence I'd suggest filing bugs for all the inconsistencies you see, and
    the TkAqua maintainers can choose whether they are to be fixed or not.

    Vince.
    Vince Guest

  6. #6

    Default Re: Differences observed with TclTkAqua v8.4.5 (on MacOSX)


    According to Chris McDonald <uwa.edu.au>:
    :Well, so much for my own brilliant idea.
    :It appears that if you query the font of a, say, menubutton, that the
    :menubutton indicates that the *requested* font *is* being used,
    :and does not return the *actual* font being used.

    Did you try executing 'font actual' to get your info?

    --
    <URL: http://wiki.tcl.tk/ > In God we trust.
    Even if explicitly stated to the contrary, nothing in this posting
    should be construed as representing my employer's opinions.
    <URL: mailto:com > <URL: http://www.purl.org/NET/lvirden/ >
    lvirden@yahoo.com Guest

Similar Threads

  1. Strong Data typing observed in MX7
    By Joedh in forum Coldfusion Database Access
    Replies: 2
    Last Post: February 16th, 05:22 PM
  2. Difference between MacOSX and PC
    By georgmorb in forum Macromedia Flash Player
    Replies: 0
    Last Post: August 16th, 02:33 PM
  3. c++ compiler for macosx 10.2.6
    By Ingmar in forum Mac Programming
    Replies: 2
    Last Post: February 1st, 07:23 PM
  4. installing Tk on macosx 10.2.6
    By Johan Meskens Cs3 Jmcs3 in forum PERL Beginners
    Replies: 0
    Last Post: January 24th, 03:59 PM
  5. GD Library on macosx
    By fabre in forum PERL Modules
    Replies: 1
    Last Post: September 17th, 09:07 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139