Got a LiveCode personal license? Are you a beginner, hobbyist or educator that's new to LiveCode? This forum is the place to go for help getting started. Welcome!
on mouseUp
if the Visible of group "fromDatePicker" = false then
set the Visible of group "fromDatePicker" to true
else
set the Visible of group "fromDatePicker" to false
end if
end mouseUp
I need to duplicate it many time in the same card, but all the new button show/hide always "fromDatPicker" of the first group.
Is there any syntax like "button Hello of this group"?
Livecode Wiki: http://livecode.wikia.com
My blog: https://livecode-blogger.blogspot.com
To post code use this: http://tinyurl.com/ogp6d5w
Do you want to duplicate the button itself? Why? What would more buttons do for you? Would each new one hide/show a different group? To distinguish one button from another you can change their names, of course, and refer to them in that way.
copy grp id 1234 of stack "Your Template Stack" to cd 1 of stack "Your Destination Stack"
put it into myGrp
hide grp "FromDatePicker" of myGrp
This syntax assumes that group "FromDatePicker" is part of another group. (I'm not sure if I understand that correctly).
Edit:
Reading Bernd's solution, I think he understands what the problem is and his solution will work.
Kind regards,
Mark
Last edited by Mark on Wed Jul 31, 2013 2:45 pm, edited 1 time in total.
The biggest LiveCode group on Facebook: https://www.facebook.com/groups/livecode.developers The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode
on mouseup
set the visible of group "fromDatepicker" of the owner of me to not the visible of group "fromDatePicker" of the owner of me
end mouseup
owner of me tells the button to operate on group "fromDatePicker" that belongs to the same group as the button you are clicking.
this is the equivalent of "like "button Hello of this group"?"