Re: Grouping checkboxes with label fields
To ask the obvious first: we assume you need, in many cases, two lines worth of label for the check box buttons but RunRev does not allow multi-line labels for check buttons. There are many ways to tackle this but if it were me I would add a custom property to each of the buttons with the full text that I wanted to associate with that button, name it something like uMyLabel Then your code could be: on mouseUp put the number of buttons of me into nbr repeat with n = 1 to nbr if (the hilite of button n of me then) put (the uMyLabel of button n of me)& ", " after theList end if end repeat delete char -2 to -1 of theList put theList into field "list" end mouseUp but then you have the issue of maintenance. What if you want to change the text of the button label? you have to fix the label and the custom property. Another solution could be to make your UI consistent.. and not use custom props. You would programatically generate a label field that holds two lines and place that next to each check box button and name it with a hook to the button, then turn off the name and label of all the buttons. ( I don't know if your GUI has space for single line label button to occupy the same vertical space as 2 liners) First, go ahead and enter the full label text property of all your buttons, don't worry about the space requirement on the GUI level for now. You just want all your data for the same type of object, all in the same "targetable" location. Next make a label field with all the properties you want them all to have. of course it will be set to wrap and align right, nice background color, text color etc...whatever you want then have a "tools" button on your UI that you can hide later. on mouseUp set the properties of templateField to the properties of fld "MyButtonLabel" repeat with x = 1 to the number of buttons of this card put ("Label_"& the short name of button x) into tLabelName create field tLabelName set the topright of fld tLabelName to (item 1 of (the topleft of button x)-4,item 2 of the topleft of button x) # you can move them later or work out the math here to place them correctly put the label of button x into fld tLabelName # turn off the label on the button itself set the showname of btn x to false # Let's now let's make the check boxes small so they are only as wide as the actual check box itself # but this will cause the position to change so we need to get the left first. put the left of btn x into tLeft set the width of btn x to 20 set the left of btn x to tLeft # restore position end Repeat reset templateField end mouseUp Then you get your list like this: on mouseUp put the number of buttons of me into nbr repeat with n = 1 to nbr if (the hilite of button n of me then) put (the Label of button n of me)& ", " after theList end if end repeat delete char -2 to -1 of theList put theList into field "list" end mouseUp For maintenance you could have a handler in your tools button to update button labels when you change/edit the GUI.. on mouseUp put the number of buttons of me into nbr repeat with n = 1 to nbr set the label of button n of me to fld ("Label_"& the short name of button x) end repeat end mouseUp many ways to tackle it. Next, since you need to see this in the UI I would programattically generate a small transparent field over each of the buttons just to the right of the check box and set the check box to for consistency On 9/13/10 3:25 PM, charles61 wrote: I have a series of cards that have checkboxes. Some of the checkboxes have labels fields under them because the label of the checkbox will not hold the content of the information displayed. Here is my question: I want to modify the following group script for checkboxes to display the content of the checkboxes plus the label fields for some of the checkboxes. I have tried grouping the checkboxes that have an additional label fields but that does not work. What changes would I need to make this work both checkboxes that have label fields and those that do not have label fields? on mouseUp put the number of buttons of me into nbr repeat with n = 1 to nbr put the short name of button n of me into tName if not the hilite of button n of me then next repeat put tName& ", " after theList -- put tName& cr after theList end repeat delete char -2 to -1 of theList put theList into field "list" end mouseUp ___ use-revolution mailing list use-revolution@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-revolution
Re: Grouping checkboxes with label fields
On 9/13/10 8:25 PM, charles61 wrote: I have a series of cards that have checkboxes. Some of the checkboxes have labels fields under them because the label of the checkbox will not hold the content of the information displayed. You can add a two-line label if you do it by script: set the label of btn 1 to "line one" &cr& "line 2" Would that help? -- Jacqueline Landman Gay | jac...@hyperactivesw.com HyperActive Software | http://www.hyperactivesw.com ___ use-revolution mailing list use-revolution@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-revolution
Re: Grouping checkboxes with label fields
Cool! I didn't know you could do that. Scott Morrow Elementary Software (Now with 20% less chalk dust!) web http://elementarysoftware.com/ email sc...@elementarysoftware.com office 1-800-360-734-4701 -- On Sep 13, 2010, at 10:07 PM, J. Landman Gay wrote: > On 9/13/10 8:25 PM, charles61 wrote: >> >> I have a series of cards that have checkboxes. Some of the checkboxes have >> labels fields under them because the label of the checkbox will not hold the >> content of the information displayed. > > You can add a two-line label if you do it by script: > > set the label of btn 1 to "line one" &cr& "line 2" > > Would that help? > > -- > Jacqueline Landman Gay | jac...@hyperactivesw.com > HyperActive Software | http://www.hyperactivesw.com > ___ > use-revolution mailing list > use-revolution@lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your subscription > preferences: > http://lists.runrev.com/mailman/listinfo/use-revolution ___ use-revolution mailing list use-revolution@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-revolution
Re: Grouping checkboxes with label fields
Thanks to everyone for their suggestions! Although Jacquline's suggestion may be the easiest to implement, I am going to try each suggestion to see which works best for me. Thanks everybody! -- View this message in context: http://runtime-revolution.278305.n4.nabble.com/Grouping-checkboxes-with-label-fields-tp2538305p2539772.html Sent from the Revolution - User mailing list archive at Nabble.com. ___ use-revolution mailing list use-revolution@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-revolution
Re: Grouping checkboxes with label fields
On 9/13/10 7:07 PM, J. Landman Gay wrote: You can add a two-line label if you do it by script: set the label of btn 1 to "line one" &cr& "line 2" Would that help? I'm sure it would...I could have sworn I tried that and it did not work but today it does. Again, we have the old problem of not being able to easily tweak the look and feel.. the check box is aligned horizontally on center between the two lines. There is no way that I have found to change the label align of the 2 line label in relation to the check box...is there a way? ___ use-revolution mailing list use-revolution@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-revolution
Re: Grouping checkboxes with label fields
On 9/14/10 11:06 PM, Web Admin Himalayan Academy wrote: On 9/13/10 7:07 PM, J. Landman Gay wrote: You can add a two-line label if you do it by script: set the label of btn 1 to "line one" &cr& "line 2" Would that help? I'm sure it would...I could have sworn I tried that and it did not work but today it does. Again, we have the old problem of not being able to easily tweak the look and feel.. the check box is aligned horizontally on center between the two lines. There is no way that I have found to change the label align of the 2 line label in relation to the check box...is there a way? No, not that I know of. I was going to mention that using this trick pretty much breaks the HIG on every platform. :( If you want it to look right you have to go back to the field and button combo -- which might be why you forgot about this trick in the first place, because it looks weird. -- Jacqueline Landman Gay | jac...@hyperactivesw.com HyperActive Software | http://www.hyperactivesw.com ___ use-revolution mailing list use-revolution@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-revolution
Re: Grouping checkboxes with label fields
--- On Tue, 9/14/10, Web Admin Himalayan Academy wrote: > On 9/13/10 7:07 PM, J. Landman Gay wrote: > > You can add a two-line label if you do it by script: > > > > set the label of btn 1 to "line one" > &cr& "line 2" > > > > Would that help? > > I'm sure it would...I could have sworn I tried that and it > did not work but today it does. Again, we have the old > problem of not being able to easily tweak the look and > feel.. the check box is aligned horizontally on center > between the two lines. > > There is no way that I have found to change the label align > of the 2 line label in relation to the check box...is there > a way? > The checkbox is always painted near the vertical middle of the button. You can always tweak the margins property o the button to move down the label so the first line matches the checkbox, but then you end up with a large button with loads of whitespace above that the user can still click on. But then you can group the button to cut off the extraneous part at the top: group the button, set the group margins to 0, set its locklocation to true and then resize it to the actual top. Works great here. Jan Schenkel = Quartam Reports & PDF Library for Revolution www.quartam.com = "As we grow older, we grow both wiser and more foolish at the same time." (La Rochefoucauld) ___ use-revolution mailing list use-revolution@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-revolution
Re: Grouping checkboxes with label fields
On 9/15/10 12:18 AM, Jan Schenkel wrote: The checkbox is always painted near the vertical middle of the button. You can always tweak the margins property o the button to move down the label so the first line matches the checkbox, but then you end up with a large button with loads of whitespace above that the user can still click on. But then you can group the button to cut off the extraneous part at the top: group the button, set the group margins to 0, set its locklocation to true and then resize it to the actual top. Works great here. Oohh... -- Jacqueline Landman Gay | jac...@hyperactivesw.com HyperActive Software | http://www.hyperactivesw.com ___ use-revolution mailing list use-revolution@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-revolution