Joseph31 Posted October 9, 2010 Posted October 9, 2010 Not sure how it's done but I have seen this before. Instead of having a smiple checkbox that displays only an "x" they have replaced it with a image of a check in a container.... I cannot figure how tis is done... Con someone show me a simple example so I may put it in my database... Thank you
Joseph31 Posted October 9, 2010 Author Posted October 9, 2010 Great thank you I will have to open this on Monday to see if I can figure how to put this sort of item on my database. Sorry for the delay. I will repost to you on monday 10 am est Thank you for a quick response.
Joseph31 Posted October 11, 2010 Author Posted October 11, 2010 (edited) Got it --- Great -- Two Questions: 1) Set is the set Global Fields For? 2) If I wanted two (2) or More Check Boxes on same layout what would I have to do so each one would act independent? Thank you Edited October 11, 2010 by Guest
bcooney Posted October 11, 2010 Posted October 11, 2010 1) Set is the set Global Fields For? This script stores the checkbox graphics in global containers so that they are available from any table without a relationship back to Prefs. 2) If I wanted two (2) or More Check Boxes on same layout what would I have to do so each one would act independent? You need a "dsp" field for every checkbox and a corresponding flag field. It's a lot more dev work and fields to support the "fancy" checkbox. You'll have to decide if it's worth it. The dev community has asked for interface tools that are more current for years, but apparently it's not as simple to support x-plat and other features are higher on FM's list.
Joseph31 Posted October 11, 2010 Author Posted October 11, 2010 Great thanks --- Your Set Global Field Script makes it easy -- I have several layouts that I might want to use this for -- But if I had only one -- would a relationship make more sense? Not sure how to do that? Thank you for all the help so far -- really helping me make more of a nicer looking database.
bcooney Posted October 11, 2010 Posted October 11, 2010 Typically, graphics (logos, etc.) end up on several layouts, even if you only think you'll need them on one. So, I'd go the global route from the start. But, if you feel that you'd rather create a relationship, since Prefs is a one record only table, all you would need is to relate the table to Prefs using a Cartesian join, and then reference the container field.
Joseph31 Posted October 11, 2010 Author Posted October 11, 2010 (edited) I think I will go with your first thought... I will go with your experience.. Last question --- Is there away to make a 3 way check box --- Do nothing -- "Blank" Flag "0" First Click -- "Check" Flag "1" Second Click -- "Red X" Flag "2" Third Click -- Revert back to Flag "0" Thank you again Edited October 11, 2010 by Guest
Raybaudi Posted October 11, 2010 Posted October 11, 2010 Yes. Substitute the calculation that you have: Abs ( Widgets::flag_IsActive - 1 ) with this: Mod ( Widgets::flag_IsActive + 1 ; 3 ) But you'll need to change even the pictures and the dsp_ActiveCB calculation.
Joseph31 Posted October 11, 2010 Author Posted October 11, 2010 (edited) Do you mean Toggle check box Script?? -- I have already added the global fields on the pref page and opening script/// Edited October 11, 2010 by Guest
Joseph31 Posted October 12, 2010 Author Posted October 12, 2010 (edited) Ok this is what I have now: g_CheckboxNo g_CheckboxYes g_CheckboxEmpty Script on Toggle Checkbox: Set Field[Widgets::Flag_IsActive;Mod(Widgets::Flag_IsActive +1;3)] The Flag status changes numbers but the icon does not... Any thoughts? Edited October 12, 2010 by Guest
efen Posted October 12, 2010 Posted October 12, 2010 Have you changed the display calculation as well? See Daniele's post But you'll need to change even the pictures and the dsp_ActiveCB calculation.
Joseph31 Posted October 12, 2010 Author Posted October 12, 2010 Oh your right -- Sorry Do not know how to right a 3 way if statement -- will a case statement work? Case ( Flag_IsActive ="0";Pref::gCheckboxEmpty; Flag_IsActive ="1";Pref::gCheckboxYes; Flag_IsActive ="2";Pref::gCheckboxNo)
Joseph31 Posted October 12, 2010 Author Posted October 12, 2010 Got it now -- I had a mistake in the line -- should have pointed to flag field not the check field... Great thank you everyone ---
Raybaudi Posted October 12, 2010 Posted October 12, 2010 Try this one... checkbox_with_three_states.zip
Joseph31 Posted October 12, 2010 Author Posted October 12, 2010 Very nice -- Used a repeating Field --- Makes it very clean -- I wish I was this good to make these items -- the database would be killer then... Thank you ---
Joseph31 Posted October 12, 2010 Author Posted October 12, 2010 (edited) your Green Check is a smaller image than the red X-- Where do you find these graphics --- I would like to use them. Thank you Edited October 12, 2010 by Guest
Raybaudi Posted October 12, 2010 Posted October 12, 2010 Here they are. They come from: http://www.mouserunner.com/Spheres_ColoCons1_Free_Icons.html Images.zip
Joseph31 Posted October 12, 2010 Author Posted October 12, 2010 Thank you Since you have no Flag Field -- How to do tell Fm that something is checked off or not -- Meaning if I have 2 check boxes and each Green Check is equal to 1 then the total would be Two -- And a script could run... Does yours have values set with each check?
Raybaudi Posted October 12, 2010 Posted October 12, 2010 Since you have no Flag Field... There is ! checkbox with three states::flag
Joseph31 Posted October 12, 2010 Author Posted October 12, 2010 How do you convert Icons to something FM can use?
Raybaudi Posted October 12, 2010 Posted October 12, 2010 I didn't convert anything. I just used the .png pictures.
Joseph31 Posted October 12, 2010 Author Posted October 12, 2010 Great thank you --- Your method of using the Repeating Fields is very clean --- I do not have to use the case calc. if I do it your way - Thank you again
Raybaudi Posted October 12, 2010 Posted October 12, 2010 It isn't mine. It is a well-established use of repeaters to store similar images.
bcooney Posted October 12, 2010 Posted October 12, 2010 I use repeaters as well, but I wanted to keep this demo as simple and obvious for a novice.
Joseph31 Posted October 15, 2010 Author Posted October 15, 2010 I have learned from this thank you -- Both of you... Joseph
Recommended Posts
This topic is 5154 days old. Please don't post here. Open a new topic instead.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now