Professional Web Applications Themes

SetControlData and GetControlData? - Mac Programming

HI... I've looked all through the ADC site, but can't find a good example of how to do this: How do I use SetControlData and SetControlData for Radio Groups and Check Boxes? I've created a dialog using Interface Builder, (and am compiling under CodeWarrior 8.3). I can set and get my edit box text fine, but I'm not sure how to set/get checkboxes and radio groups. Can someone please post example code (or a good explanation) for doing this? The doentation is very hard to figure out. Thanks so much... -Howard...

  1. #1

    Default SetControlData and GetControlData?

    HI...

    I've looked all through the ADC site, but can't find a good example of
    how to do this: How do I use SetControlData and SetControlData for Radio
    Groups and Check Boxes? I've created a dialog using Interface Builder, (and
    am compiling under CodeWarrior 8.3). I can set and get my edit box text
    fine, but I'm not sure how to set/get checkboxes and radio groups. Can
    someone please post example code (or a good explanation) for doing this?
    The doentation is very hard to figure out. Thanks so much...

    -Howard



    Howard Guest

  2. #2

    Default Re: SetControlData and GetControlData?

     

    You simply set the control value to 0 (not checked) or 1 (checked) using
    SetControlValue for each radio button and check box.
    To get the state use GetControlValue.

    so long,
    Sven
    Sven Guest

  3. #3

    Default Re: SetControlData and GetControlData?


    "Sven Mumenthaler" <ch> wrote in message
    news:ethz.ch... [/ref]
    of [/ref]
    Radio [/ref]
    (and 
    >
    > You simply set the control value to 0 (not checked) or 1 (checked) using
    > SetControlValue for each radio button and check box.
    > To get the state use GetControlValue.
    >
    > so long,
    > Sven[/ref]

    SetControlValue and GetControlValue are not recommended for use with the
    newer controls under OSX, according the doc's I've read. I've got
    ControlRef's, not Handle's, and I'm making use of carbon events in my app.
    So I don't want Set/GetControlValue. That's why I'm using SetControlData
    for my text boxes. I've found the answer though...it's to use
    SetControl32BitValue and GetControl32BitValue.

    Thanks anyway,
    Howard


    Howard Guest

  4. #4

    Default Re: SetControlData and GetControlData?

    On 27 Jan 2004, Howard wrote:
     
    >
    > SetControlValue and GetControlValue are not recommended for use with the
    > newer controls under OSX, according the doc's I've read. I've got
    > ControlRef's, not Handle's, and I'm making use of carbon events in my app.
    > So I don't want Set/GetControlValue. That's why I'm using SetControlData
    > for my text boxes. I've found the answer though...it's to use
    > SetControl32BitValue and GetControl32BitValue.
    >[/ref]

    They are the same for everything except scrollbars i think.

    Fred

    Frederick Guest

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139