Filemaker like checkbox

To all former and current Filemaker developers.

Is there any way in Xojo to duplicate or simulate the way a checkbox is created based on a value list in Filemaker? I basically need to create a list that the user might edit from time to time and I want a checkbox that can list all the values that is in the list when the window opens.

Thanks

a “checkbox” is a boolean control… it is checked or its not checked.
Do you mean a combobox or popup menu?

no, but the code to do this would be pretty straightforward:

  • create a Checkbox on your window and make it a member of a control array with 1 member.
  • write a method to take a value list, and for each item in the list make a clone of Checkbox(0) and set the label properly
  • some logic to decide how to lay the new checkboxes out (horizontal/vertically).
  • some logic in the Checkbox.action event to do the right thing.

[quote=258662:@Dave S]
a “checkbox” is a boolean control… it is checked or its not checked.[/quote]
If you don’t know FIleMaker you won’t know what he’s talking about. It looks like this:

The checkbox names are taken from a Value list (which in filemaker is basically a computed array of values).

For each item the user clicks, the checkbox adds that value string to a EndOfLine-delmited list.

This looks fairly easy to do with a ListBox.

The Listbox is a great idea Michel. That would add the ability to scroll checkbox sets which FileMaker can’t do unless you use a portal.

I’ve worked out a way of doing this that works pretty well using a control set including loading the list from a table. I’m going to see if xDev Magazine would be interested in an article on it. If not I can post the app here.

This would be fairly easy to do with containers too. Have an overall container for the group and then create Add methods to dynamically add Checkbox containers. The only advantage to doing it this way is that you could do the same technique on both desktop and web.

FWIW, I tend to avoid control sets. I’ve found they are useful in certain rare situations but for the most part cause more trouble than they’re worth.