[Gambas-user] control groups

Eldon Eller eeller at ...826...
Mon Dec 4 05:55:04 CET 2006


Sorry, I did not state my problem clearly. What I want to do is 
something like this (which does not work):
FOR EACH button IN dates
    if button.SomeProperty = Something then do SomeSub
NEXT

Christopher Brian Jack wrote:
> On Sun, 3 Dec 2006, Eldon Eller wrote:
>
>   
>> Please forgive a dumb question. I have grouped a bunch of buttons under
>> the name "dates". An event handler, dates_click(), along with "last"
>> works as expected. Now I would like to step through all the buttons in
>> dates, and take some action based on the properties of the button. I do
>> not know how to do this, and I could not find anything helpful in the
>> documentation. It may be there, but if so, I missed it.
>>     
>
> Set the Tag property in the form designer on each button in the group to a
> unique word and use SELECT ... END SELECT:
>
> SELECT last.Tag
>   CASE "NameOf1stButton"
>     ...
>   CASE "NameOf2ndButton"
>     ...
>   CASE ...
>     ...
>   ...
>   ...
>   DEFAULT
>     ...
> END SELECT
>
> To choose the code to run (based on the button) in the event handler for
> the group.
>
> .=================================================.
> |  Christopher BRIAN Jack aka "Gau of the Veldt"  |
> +================================================='
> | oevna at ...1543...
> `=================================================-
> Hi Spambots, my email address is sputnik at ...1334...
> Hi Humans, my email address uses rot13 cipher
>
> -------------------------------------------------------------------------
> Take Surveys. Earn Cash. Influence the Future of IT
> Join SourceForge.net's Techsay panel and you'll get the chance to share your
> opinions on IT & business topics through brief surveys - and earn cash
> http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
> _______________________________________________
> Gambas-user mailing list
> Gambas-user at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/gambas-user
>
>   




More information about the User mailing list