Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Example of Updating Style Across Themes?
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  4 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Jennifer Henderson  
View profile  
 More options Apr 10 2012, 12:23 pm
Newsgroups: comp.lang.tcl
From: Jennifer Henderson <jensmaver...@gmail.com>
Date: Tue, 10 Apr 2012 09:23:19 -0700 (PDT)
Local: Tues, Apr 10 2012 12:23 pm
Subject: Example of Updating Style Across Themes?
Anyone have a quick example of how to define style changes for
different themes.  We allow the user to change theme, so I would need
to update my style changes to TEntry for all the themes.  We are
adding an selectable image in the entry field.

For xpnative I have:

ttk::style layout fileselector.TEntry {
                Entry.field -sticky nswe -border 0 -children {
                    Entry.fileselector -side right -sticky ns
                    Entry.padding -expand 1 -sticky nswe -children {
                        Entry.textarea -sticky nswe
                    }
                }
            }

Thanks in advance,
Sue


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Harald Oehlmann  
View profile  
 More options Apr 11 2012, 3:24 am
Newsgroups: comp.lang.tcl
From: Harald Oehlmann <wortka...@yahoo.de>
Date: Wed, 11 Apr 2012 00:24:15 -0700 (PDT)
Local: Wed, Apr 11 2012 3:24 am
Subject: Re: Example of Updating Style Across Themes?
On 10 Apr., 18:23, Jennifer Henderson <jensmaver...@gmail.com> wrote:

I suppose, you have to bind to the virtual event <<ThemeChanged>> and
reapply the private style.
I have no experience, but remembered Johanns talk on Tcl2010:
http://www.eurotcl.org/2010/Download/EuroTcl2010-Presentation-Bwidget...

-Harald


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Emiliano  
View profile  
 More options Apr 13 2012, 6:45 pm
Newsgroups: comp.lang.tcl
From: Emiliano <emilianogavi...@gmail.com>
Date: Fri, 13 Apr 2012 15:45:38 -0700 (PDT)
Local: Fri, Apr 13 2012 6:45 pm
Subject: Re: Example of Updating Style Across Themes?
On 10 abr, 13:23, Jennifer Henderson <jensmaver...@gmail.com> wrote:

You need to use [ttk::style theme settings $theme {# your setting
here}]
to install the desired layout on each theme.

To install a custom style/layout on each theme, I use

apply {{} {
    foreach theme [themes] {
        package require ttk::theme::$theme
        style theme setting $theme {
            style layout fileselector.TEntry {
            # here comes the layout
            }
        }
    }

} ::ttk}

[apply] is to avoid creating an (undesired) "theme" variable in
the current context.

Regards
Emiliano


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Sue  
View profile  
 More options May 4 2012, 11:49 am
Newsgroups: comp.lang.tcl
From: Sue <jenni...@altair.com>
Date: Fri, 4 May 2012 08:49:14 -0700 (PDT)
Local: Fri, May 4 2012 11:49 am
Subject: Re: Example of Updating Style Across Themes?
Emiliano,

Thank you for the suggestion.  When I use the code above, I am now
seeing the style/layout being assigned to each theme when I query in
the console.  But when I view my widget, it is not behaving as
expected.  I am trying to put a folder image in the far right region
of the entry field.  I see it on the xpnative theme, but no other
theme.

ttk::style element create fileselector image \
  [list $launchimage {active pressed !disabled} \
  $launchpressed {active !disabled} \
  $launchactive ] \
  -width 16 \
  -sticky w

apply {{} {
 foreach theme [ttk::themes] {
   package require ttk::theme::$theme
   ttk::style theme setting $theme {
     ttk::style layout fileselector.TEntry {
       Entry.field -sticky nswe -border 0 -children {
         Entry.fileselector -side right -sticky ns
           Entry.padding -expand 1 -sticky nswe -children {
             Entry.textarea -sticky nswe
           }
         }
      }
    }
  }

} ::ttk}

Thank you in advance

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »