David Nelson Posted August 19, 2012 Posted August 19, 2012 (edited) Attached simple button in version 11. I want to name the buttons and have conditional format know itself and turn color if it is the same as the layout name. I do not have the text as the button text but it should not matter. I have LeftWords ( Get ( LayoutName ) ; 1 ) = LeftWords ( GetLayoutObjectAttribute ( "button" ; "content" ) ; 1 ) I thought I understood how it works. I named the text object 'button'. I want to name all my buttons 'button' but I want them to evaluate only themselves and not other buttons. As shown the layout is simple "home" one word, no spaces but it will not match. How can I see this with data viewer? I cannot see conditional formatting that I can tell. Help would be much appreciated. And yes, I searched but this time, I got wayyyy too many answers and I confess I only went through about 30 of them and got tired. I wish there was a quick-scan preview option where one could rapidly scan. Button_Name.zip Edited August 19, 2012 by David Nelson
David Nelson Posted August 19, 2012 Author Posted August 19, 2012 Never mind I got it. In the demo I had forgotten to attach the object name. And I do not know why I thought I had to ask for LeftWords on the object name. Maybe I was trying to be too global and general to account for all uses. Anyway, I will leave this but if moderators think it should be deleted, please do. I figure someone else might get tripped although this was silly mistake on my part. It still cost me three hours in searching. But I will not make this mistake again. :idot:
David Nelson Posted August 19, 2012 Author Posted August 19, 2012 The whole idea failed. I cannot name all my buttons 'button'. They must be unique object names. I just want to name a button or text object and if that matches something else, in this case the layout, change the color. I would like to use script parameter but the buttons should change when then layout changes and not by being clicked. Back to the drawing board -
dansmith65 Posted August 19, 2012 Posted August 19, 2012 Try this in your conditional formatting: Get( LayoutName ) = Self If your layout name matches the button text, the formatting will be applied. 2
eos Posted August 19, 2012 Posted August 19, 2012 As shown the layout is simple "home" one word, no spaces but it will not match. How can I see this with data viewer? I cannot see conditional formatting that I can tell. Here's a tip that may help you in the future: in order to view calculation results in the data viewer, use Let () to assign (intermediate) results to global variables and display those in the data viewer. (Don't forget to take them out again when everything works.)
David Nelson Posted August 21, 2012 Author Posted August 21, 2012 Thank you Eos. I had done that but it displayed nothing. Good to know that method should have worked if I get the calculation right.
Recommended Posts
This topic is 4570 days old. Please don't post here. Open a new topic instead.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now