[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [MiNT] Generic tool



On Fri, 3 Dec 2010 18:06:54 , Peter Slegg <p.slegg@scubadivers.co.uk> wrote:
>
> I think I have just found the way to do this:
>
> http://windom.free.fr/doc/c_070f01.html
>
> It looks like I can attach a variable that will tell me what items
> are selected :-)

I have got checkboxes working, it can read the users selections but
I haven't worked out radio buttons yet. It doesn't set the correct
item at start-up and doesn't return the right value. The code and
app is on my website again.

  /* Select the required button */
  if (strcmp(ezxml_attr(Xml_rad_button,"status"), "on") == 0)
  {
      radButSelected = radio_bttn;
//      dfrm_setstate( dial, radio_bttn, SELECTED, TRUE);
  }

  dfrm_attach( dial, radio_bttn, BIND_VAR, &radButSelected,0); /* attach the button to a variable  */
  dfrm_add( dial, radio_group, radio_bttn, 10, 10, DIR_VERT);

Peter