Jump to content

GetLayoutObjectAttribute


This topic is 4257 days old. Please don't post here. Open a new topic instead.

Recommended Posts

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 by David Nelson
Link to comment
Share on other sites

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:

Link to comment
Share on other sites

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 -

Link to comment
Share on other sites

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.)

Link to comment
Share on other sites

This topic is 4257 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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.