>Hi everybody,
>
>I have a pageframe with several pages. On the 3rd page there are 10 checkboxes. They all had almost identical code in their Init method
>
>that set its caption to a value of the field in preferences table.
>
>I decided, that having the practically identical code doesn't sound very OOP to me, so I moved the code into Page.Init and wrote a little FOR each loop.
>
>The Page.Init is executed, but the checkboxes have their original check1 caption and not the correct caption. I placed the original code into Init of the first checkbox and it came with the correct caption.
>
>Do you know why I may be having such weird behavior? Why setting caption in Init of the page doesn't work, but works in each control's init?
>
>Thanks in advance.
>
>UPDATE. Sorry, it was a programming mistake. I figured this out.
You can have an array of checkboxes. See my FAQ #8110 for several options.
Difference in opinions hath cost many millions of lives: for instance, whether flesh be bread, or bread be flesh; whether whistling be a vice or a virtue; whether it be better to kiss a post, or throw it into the fire... (from Gulliver's Travels)