Page 1 of 1

ReRender on Change?

PostPosted: 27 Sep 2013 13:48
by Soren SDF
Hi.

I have a region and i want to toggle its visibility with when i set the state of a checkbutton.
I'have put this in the forms on render eventhandler:

IF CheckBtnsRapporter.CheckButtons.Items[0].Checked THEN
RegFrameKvittensOptions.Style.Values['display']:= ''
ELSE
RegFrameKvittensOptions.Style.Values['display']:= 'none';

If i check the checkbutton and press another button on the form it rerenders and displays the region, but i would prefer to have the checkbuttons OnChange event do it instead.
Is this possible?

T.I.A.
Sören

Re: ReRender on Change?

PostPosted: 27 Sep 2013 14:05
by Alexander Bulei
Hi Soren,

Did you try set the Visibility property?

delphi code
RegFrameKvittensOptions.Visible:= False;


Best Regards.

Re: ReRender on Change?

PostPosted: 27 Sep 2013 14:40
by Soren SDF
I have now. :-)
Makes no difference i'm afraid. It seems that when i put something in the OnChange of the CheckButtons the form rerenders and sets checkbuttons to checked=false, which of course makes the region stay invisible.
I described the same problem in the thread "Button and Checkbuttons" under General.

Sören

Re: ReRender on Change?

PostPosted: 27 Sep 2013 14:49
by Alexander Bulei
Hi Soren SDF,

Soren SDF wrote:I have now. :-)
Makes no difference i'm afraid. It seems that when i put something in the OnChange of the CheckButtons the form rerenders and sets checkbuttons to checked=false, which of course makes the region stay invisible.
I described the same problem in the thread "Button and Checkbuttons" under General.

Sören


Please check your thread under general.

Best Regards.