dbTalk Databases Forums  

Checking a box

comp.databases.filemaker comp.databases.filemaker


Discuss Checking a box in the comp.databases.filemaker forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Pismo
 
Posts: n/a

Default Checking a box - 02-04-2007 , 10:55 AM






I have several boxes that I would like to tab to and then clicking in the
field would create a checkmark. Clicking again would remove the checkmark.
Any suggestions?

FMP 6.04 Mac

Thanks


Reply With Quote
  #2  
Old   
Ursus
 
Posts: n/a

Default Re: Checking a box - 02-04-2007 , 02:04 PM






Say the field is named MyField, Say the checkmark is connected to a
valuelist which has as values 0 (no check) and 1 (has a check)

Create a script <ToggleMyField>

If MyField = 1
set MyField (value:0)
else
Set MyField (Value:1)
end if

Connect this script to MyField as a button, so it would run everytime you
clcik the field.

Ursus

"Pismo" <pismo (AT) dslextreme (DOT) com> schreef in bericht
news:C1EB500C.335D%pismo (AT) dslextreme (DOT) com...
Quote:
I have several boxes that I would like to tab to and then clicking in the
field would create a checkmark. Clicking again would remove the checkmark.
Any suggestions?

FMP 6.04 Mac

Thanks




Reply With Quote
  #3  
Old   
Helpful Harry
 
Posts: n/a

Default Re: Checking a box - 02-04-2007 , 02:14 PM



In article <C1EB500C.335D%pismo (AT) dslextreme (DOT) com>, Pismo
<pismo (AT) dslextreme (DOT) com> wrote:

Quote:
I have several boxes that I would like to tab to and then clicking in the
field would create a checkmark. Clicking again would remove the checkmark.
Any suggestions?

FMP 6.04 Mac
That's what the Checkbox formatting of a field is for. )

First you need to use the Define Value List menu option to create a new
Value List with just one value of "On" (or "Yes" or "Smurfberry Juice"
or whatever you want).

Next define your fields as normal and put the fields on the layout. If
the fields already exist, then you will need to go through deleting the
data from them so that field is empty.

For each field, click on it and the choose Field Format from the Format
menu. Here you can choose to format the fields as a Checkbox using the
Value List you defined above. Also make sure each field has a line
colour set for it in FileMaker's side toolbar.

You may need to stretch the fields' widths to see you value's text.
Alternatively you can shrink the width of the fields and use a normal
text label put next to the checkbox.

In scripts and calculations you can see if the checkbox is turned on or
off by:

If (MyCheckboxField = "On")
Message ("Checkbox is on")
End If

and

If (MyCheckboxField <> "On")
Message ("Checkbox is off")
End If

(Note: the "<>" symbol means "not equal" and can be replaced by the
equals symbol with a line through it, but either way works.)






Helpful Harry
Hopefully helping harassed humans happily handle handiwork hardships ;o)


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.