Selecting a field in a List Field

AMACHADO at bouyguestelecom.fr AMACHADO at bouyguestelecom.fr
Fri Aug 12 10:39:41 EDT 2005


Thanks A LOT Sarah for your useful answer...
Mixing hilitedLine, hide and show, I nearly do what I want.

A problem still remains : 
When a card opens after a go to card "Card Name", how can have a command done immediatly like :
	Highlight the first line of a Field List ?
	Have some Lists Hidden and some others showed in this card ?

Alex.

-----Message d'origine-----
De : use-revolution-bounces at lists.runrev.com [mailto:use-revolution-bounces at lists.runrev.com] De la part de Sarah Reichelt
Envoyé : vendredi 12 août 2005 02:35
À : How to use Revolution
Objet : Re: Selecting a field in a List Field


Hi Alexandre,

Welcome to the Revolution!

> I'm a very beginner with Revolution and I want to do the following :
>
>> From a List Field, when I click on a field, another List Field
>> replaces
>>
> the first one
>
> I want to do something like this
> ----------------------------------
> "Home" List field :
>     1 GoTo menu 1
>     2 GoTo menu 2
>     3 GoTo menu 3
>
> If I click on 'GoTo menu 2' :
> Another List Field replaces the "Home" Field List.
> ----------------------------------
>
> Can someone help me and give me some tips ?
> I tried to compare (on Mouse Down) using SelectedLine() : but I
> need to
> compare with "line X of item 1"
> How do you replace a FieldList by another ?

Firstly, when clicking in a list field, there are several ways to  
detect which line has been clicked. The two that are probably best  
for you to use are:
the hilitedLine of fld "Home"  -- this gives the line number the selectedText of fld "Home  -- this gives the text of the clickedLine

You can do this by varying the content of each field:
on mouseUp
   put the selectedText of me into tMenuChoice
   if tMenuChoice = "GoTo menu 1" then
     put "Choice 1" & cr & "Choice 2" & cr & "Choice 3" into me
   else
     -- fill in what happens with the other choices
   end if
end mouseUp

An easier way might be to have the menus in different fields. These  
could appear sequentially depending on which initial choice is  
clicked e.g. Clicking "Goto menu 1" would show a field containing the  
menu 1 options but hide those containing menus 2 & 3 and so on.

on mouseUp
   put the selectedText of me into tMenuChoice
   if tMenuChoice = "GoTo menu 1" then
     hide field "Menu2"
     hide field "Menu3"
     show field "Menu1"
   else
     -- fill in what happens with the other choices
   end if
end mouseUp

HTH,
Sarah


_______________________________________________
use-revolution mailing list
use-revolution at lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-revolution

____________________________________________________________

L'integrité de ce message n'étant pas assurée sur Internet, Bouygues Telecom ne peut être tenue responsable de son contenu en ce compris les pièces jointes. Toute utilisation ou diffusion non autorisée est interdite. Si vous n'êtes pas destinataire de ce message, merci de le détruire et d'avertir l'expéditeur.

The integrity of this message cannot be guaranteed on the Internet. Bouygues Telecom cannot therefore be considered liable for the contents including its attachments. Any unauthorized use or dissemination is prohibited. If you are not the intended recipient of this message, then please delete it and notify the sender. 
____________________________________________________________




More information about the use-livecode mailing list