|
View:
New views
13 Messages
—
Rating Filter:
Alert me
|
|
|
ttk::buttons using Toolbutton style by default?I've noticed a strange bug cropping up in one of my applications: the
appearance of ttk::buttons. See the screenshot below: http://www.codebykevin.com/tilebuttons.png These buttons appear to be utilizing the Toolbutton style, but I haven't set them up that way. Here is the code that calls them: ttk::frame .preferences.push -padding 10 pack .preferences.push -side bottom -fill both -expand yes ttk::button .preferences.push.button -command "savePref; destroy .preferences" -text "Save Preferences" ttk::button .preferences.push.restore -command "restorePref; destroy .preferences" -text "Restore Defaults" ttk::button .preferences.push.cancel -text "Cancel" -command "destroy .preferences" pack preferences.push.button .preferences.push.restore .preferences.push.cancel -side right -fill both -expand no Any idea what might be causing these to look this way? -- Kevin Walzer Code by Kevin http://www.codebykevin.com ------------------------------------------------------------------------- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ _______________________________________________ Tcl-mac mailing list tcl-mac@... https://lists.sourceforge.net/lists/listinfo/tcl-mac |
|
|
Re: ttk::buttons using Toolbutton style by default?Kevin Walzer wrote: > [...] > These buttons appear to be utilizing the Toolbutton style, but I haven't > set them up that way. Here is the code that calls them: > ttk::frame .preferences.push -padding 10 > pack .preferences.push -side bottom -fill both -expand yes > ttk::button .preferences.push.button -command "savePref; destroy > .preferences" -text "Save Preferences" > [...] Check the option database: option get .preferences.push.button style Style If that returns "Toolbutton", grep your source for 'option add .* Toolbutton' to see where it's coming from. If that returns the empty string, I'm stumped ... --JE ------------------------------------------------------------------------- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ _______________________________________________ Tcl-mac mailing list tcl-mac@... https://lists.sourceforge.net/lists/listinfo/tcl-mac |
|
|
Re: ttk::buttons using Toolbutton style by default?Joe English wrote:
> Kevin Walzer wrote: >> [...] >> These buttons appear to be utilizing the Toolbutton style, but I haven't >> set them up that way. Here is the code that calls them: >> ttk::frame .preferences.push -padding 10 >> pack .preferences.push -side bottom -fill both -expand yes >> ttk::button .preferences.push.button -command "savePref; destroy >> .preferences" -text "Save Preferences" >> [...] > > Check the option database: > > option get .preferences.push.button style Style > > If that returns "Toolbutton", grep your source for > 'option add .* Toolbutton' to see where it's coming from. > > If that returns the empty string, I'm stumped ... > > > --JE It does return the empty string. What's especially weird is that the buttons use the normal TButton style if I grid them; it's packing them that messes things up. Even more strange, even if I explicitly configure the style as TButton, they display as Toolbutton if I pack them. This doesn't happen in other instances when I pack ttk::buttons--it only happens here. This is with Tk 8.5.0 on Leopard. -- Kevin Walzer Code by Kevin http://www.codebykevin.com ------------------------------------------------------------------------- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ _______________________________________________ Tcl-mac mailing list tcl-mac@... https://lists.sourceforge.net/lists/listinfo/tcl-mac |
|
|
Re: ttk::buttons using Toolbutton style by default?> It does return the empty string.
> > What's especially weird is that the buttons use the normal TButton > style > if I grid them; it's packing them that messes things up. Even more > strange, even if I explicitly configure the style as TButton, they > display as Toolbutton if I pack them. > > This doesn't happen in other instances when I pack ttk::buttons--it > only > happens here. > > This is with Tk 8.5.0 on Leopard. Are you packing with -fill both or something? The Aqua buttons are only allowed to be the standard height. If there is even one pixel of height difference, Ttk automatically converts them to the Toolbutton-looking style. I would assume this is because the the jelly bean buttons can't grow vertically. How are you packing them? D ------------------------------------------------------------------------- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ _______________________________________________ Tcl-mac mailing list tcl-mac@... https://lists.sourceforge.net/lists/listinfo/tcl-mac |
|
|
Re: ttk::buttons using Toolbutton style by default?Damon Courtney wrote:
> > Are you packing with -fill both or something? The Aqua buttons > are only allowed to be the standard height. If there is even one > pixel of height difference, Ttk automatically converts them to the > Toolbutton-looking style. I would assume this is because the the > jelly bean buttons can't grow vertically. > Hmmm, that's the culprit. I removed "-fill" and that solved the problem. I had no idea ttk had this behavior. -- Kevin Walzer Code by Kevin http://www.codebykevin.com ------------------------------------------------------------------------- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ _______________________________________________ Tcl-mac mailing list tcl-mac@... https://lists.sourceforge.net/lists/listinfo/tcl-mac |
|
|
Re: ttk::buttons using Toolbutton style by default?Damon Courtney wrote: > > Are you packing with -fill both or something? The Aqua buttons > are only allowed to be the standard height. If there is even one > pixel of height difference, Ttk automatically converts them to the > Toolbutton-looking style. I would assume this is because the the > jelly bean buttons can't grow vertically. It does? I was not aware of this... The core ::button widget might work this way, but not the ttk::button -- at least not intentionally. If this is happening with ttk::buttons, it must be due to some undocumented feature of DrawThemeButton(). Kevin, what does [$w cget -style] say? If it's not being set from the option database, maybe something else is changing it? --JE ------------------------------------------------------------------------- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ _______________________________________________ Tcl-mac mailing list tcl-mac@... https://lists.sourceforge.net/lists/listinfo/tcl-mac |
|
|
Re: ttk::buttons using Toolbutton style by default?wm geometry . 300x300
ttk::button .b -text Foo pack .b -expand 1 -fill both D On Feb 22, 2008, at 10:29 AM, Joe English wrote: > > Damon Courtney wrote: >> >> Are you packing with -fill both or something? The Aqua buttons >> are only allowed to be the standard height. If there is even one >> pixel of height difference, Ttk automatically converts them to the >> Toolbutton-looking style. I would assume this is because the the >> jelly bean buttons can't grow vertically. > > It does? I was not aware of this... > > The core ::button widget might work this way, but > not the ttk::button -- at least not intentionally. > If this is happening with ttk::buttons, it must be > due to some undocumented feature of DrawThemeButton(). > > Kevin, what does [$w cget -style] say? If it's not > being set from the option database, maybe something > else is changing it? > > > --JE > > ------------------------------------------------------------------------- > This SF.net email is sponsored by: Microsoft > Defy all challenges. Microsoft(R) Visual Studio 2008. > http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ > _______________________________________________ > Tcl-mac mailing list > tcl-mac@... > https://lists.sourceforge.net/lists/listinfo/tcl-mac ------------------------------------------------------------------------- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ _______________________________________________ Tcl-mac mailing list tcl-mac@... https://lists.sourceforge.net/lists/listinfo/tcl-mac |
|
|
Re: ttk::buttons using Toolbutton style by default?Damon Courtney wrote: > Joe English wrote: > > Damon Courtney wrote: > >> Are you packing with -fill both or something? The Aqua buttons > >> are only allowed to be the standard height. If there is even one > >> pixel of height difference, Ttk automatically converts them to the > >> Toolbutton-looking style. I would assume this is because the the > >> jelly bean buttons can't grow vertically. > > > > It does? I was not aware of this... > > > > The core ::button widget might work this way, but > > not the ttk::button -- at least not intentionally. > > If this is happening with ttk::buttons, it must be > > due to some undocumented feature of DrawThemeButton(). > > wm geometry . 300x300 > ttk::button .b -text Foo > pack .b -expand 1 -fill both I'm not seeing the behavior you describe (with core buttons or ttk::buttons). Is this a Leopard-only phenomenon? --JE ------------------------------------------------------------------------- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ _______________________________________________ Tcl-mac mailing list tcl-mac@... https://lists.sourceforge.net/lists/listinfo/tcl-mac |
|
|
Re: ttk::buttons using Toolbutton style by default?Joe English wrote:
> Damon Courtney wrote: >> Joe English wrote: >>> Damon Courtney wrote: >>>> Are you packing with -fill both or something? The Aqua buttons >>>> are only allowed to be the standard height. If there is even one >>>> pixel of height difference, Ttk automatically converts them to the >>>> Toolbutton-looking style. I would assume this is because the the >>>> jelly bean buttons can't grow vertically. >>> It does? I was not aware of this... >>> >>> The core ::button widget might work this way, but >>> not the ttk::button -- at least not intentionally. >>> If this is happening with ttk::buttons, it must be >>> due to some undocumented feature of DrawThemeButton(). >> wm geometry . 300x300 >> ttk::button .b -text Foo >> pack .b -expand 1 -fill both > > > I'm not seeing the behavior you describe (with core buttons > or ttk::buttons). Is this a Leopard-only phenomenon? > Perhaps--I do see the described behavior on Leopard. -- Kevin Walzer Code by Kevin http://www.codebykevin.com ------------------------------------------------------------------------- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ _______________________________________________ Tcl-mac mailing list tcl-mac@... https://lists.sourceforge.net/lists/listinfo/tcl-mac |
|
|
Finally ready to begin with TCL/TKHi All,
I wrote a while back about some introductory thoughts on using TCL and TK as my primary development toolkit/platform. I am finally ready to begin now that my job has come to an end and I have my days to really focus. So my first task I was thinking about was creating an iTunes Plug-in using the visualizer SDK. Just so I understand, can one call tcl/tk from C++ and such? Can one interface with Apple's Webkit and suck from TCL/TK or is there a widget for TK where I can present a web page type interface? Basically, I have to use the visualizer SDK however. I know these are basic, weird questions, I am just trying to guage everything and start putting tcl/tk to use with current projects that I have been offered. I was planning on blogging my start with tcl/tk and making the whole blog available for others. Thanks, -Jason ------------------------------------------------------------------------- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ _______________________________________________ Tcl-mac mailing list tcl-mac@... https://lists.sourceforge.net/lists/listinfo/tcl-mac |
|
|
Re: Finally ready to begin with TCL/TKI've never developed on MacOS, so these comments are going to be from a more generic sense. > can one call tcl/tk from C++ and such? Tcl was originally intended to be "just another C library", callable from an application. _However_, many people today go at their program design from the other side - writing a Tcl program, and creating "packages" of C code for specialized things (like visualiser sdks, jpeg libraries, whatever...). > Can one interface with Apple's Webkit and suck from TCL/TK I don't know the answer to this one - but I suspect others on this list do. > or is there a widget for TK where I can present a web page type interface? There is a "third party" widget called "tkhtml" that has _some_ of this type functionality. -- <URL: http://wiki.tcl.tk/ > Even if explicitly stated to the contrary, nothing in this posting should be construed as representing my employer's opinions. <URL: mailto:lvirden@... > <URL: http://www.purl.org/NET/lvirden/ > ------------------------------------------------------------------------- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ _______________________________________________ Tcl-mac mailing list tcl-mac@... https://lists.sourceforge.net/lists/listinfo/tcl-mac |
|
|
Re: Finally ready to begin with TCL/TKOn 08-02-25, at 11:30, J. Todd Slack wrote:
> Just so I understand, can one call tcl/tk from C++ and such? Yes, most of my experience is just with the Tcl.framework though. > Can one interface with Apple's Webkit and suck from TCL/TK Yes. I'm using a Carbon HIWebView for this. You'll have to tweak the example to be able to take it anywhere and there is a well known bug that you can only embed it into the content view. Also, last year, several people were complaining about mouse clicks for flash plugins but I think it was discovered to be a bug with flash. Philip Aker echo astwta@...@nl | tr a-z@. p-za-o.@ ------------------------------------------------------------------------- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ _______________________________________________ Tcl-mac mailing list tcl-mac@... https://lists.sourceforge.net/lists/listinfo/tcl-mac |
|
|
Re: Finally ready to begin with TCL/TKDear Philip,
>> Just so I understand, can one call tcl/tk from C++ and such? > > Yes, most of my experience is just with the Tcl.framework though. Yes, you can call Tk from C++, you can call C++ from Tk, and you can do both at the same time. It sounds circular, but it all works out at link time. You declare the Tk routines as external, and resolve them at link time by linking to the Frameworks with compiler options like this: -F../YourApp.app/Contents/Frameworks -framework Tcl -framework Tk One of the routins you declare as external is: Tcl_CreateObjCommand This routine installs one of your own C (or C++ or Pascal or whatever) routine as a command available in the TCLTK interpreter. Your routine must have a particular format: particular parameters and result. Inside your own C code, you call Tk routines by name. For example, you can call Tcl_Eval, to which you pass a string that gets evaluated in the TCLTK interpreter. Yours, Kevan -- Kevan Hashemi, Electrical Engineer Physics Department, Brandeis University http://alignment.hep.brandeis.edu/ ------------------------------------------------------------------------- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ _______________________________________________ Tcl-mac mailing list tcl-mac@... https://lists.sourceforge.net/lists/listinfo/tcl-mac |
| Free Forum Powered by Nabble | Forum Help |