Page 1 of 1

Show/hide edit in popup

PostPosted: 28 Feb 2014 15:59
by magosk
I have a TIWCGJQMEdit (along with a label and some buttons) placed in a TIWCGJQMPopup. I open the popup when clicking on a listview item, and depending on data for that item I want to set visisbility to True or False for the edit control before opening the popup. I cannot get this to work by using the Visible property (the popup follows the design time setting for it, but does not change between times I open it). I tried calling Popup.AjaxRerender, but that just messes it up. Is there an easy way to get this to work?

Using 1.9.0.3373, IW 12.2.27, Delphi XE.

Best regards

Magnus Oskarsson

P.S. I am off on vacation next week, so unless you reply extremely quickly, I won't be able to provide any feedback until the week after that.

Re: Show/hide edit in popup

PostPosted: 03 Mar 2014 11:01
by Alexander Bulei
Hi magosk,

It seems to have issue with visible property of JQMEdit.

We will fix it right now.

Thanks.

Best Regards.

Re: Show/hide edit in popup

PostPosted: 14 Mar 2014 14:39
by magosk
cgdevtools wrote:Hi magosk,

It seems to have issue with visible property of JQMEdit.

We will fix it right now.

Thanks.

Best Regards.


Hi, I'm finally looking at this again. The visibility only partially works in the new version: if Visible is False at design-time, it will not occupy any vertical space in the popup (it is placed between a label and a button), and if you later set visible to True you will not see it. If Visible = True at design-time you will see it, but if you change it to False later it will leavy a large empty vertical space between the label and the button. In other words, it does not behave correctly with respect to (vertical) alignment.

Re: Show/hide edit in popup

PostPosted: 14 Mar 2014 15:11
by Jorge Sousa
Hi

This was fixed in version .3394

But you must not forget that (anyoing) Intraweb property RenderInvisbleControls, default False

if the edit's parent RenderInvisbleControls=False, and the Edit.Visible=False, it wont be rendered at all.

Re: Show/hide edit in popup

PostPosted: 17 Mar 2014 09:26
by magosk
cgdevtools_support wrote:Hi

This was fixed in version .3394

But you must not forget that (anyoing) Intraweb property RenderInvisbleControls, default False

if the edit's parent RenderInvisbleControls=False, and the Edit.Visible=False, it wont be rendered at all.


You are correct that with RenderInvisibleControls = True, the design time setting does not matter. Still, the edit consumes vertical space when invisible (using 2.0.0.3413), which is not how controls with vertical alignment are supposed to behave. Can you fix this, or is there some kind of workaround? Just to be clear, when the edit is visible, I want to display the following in the popup:

Label
Edit caption
Edit box
Button
Button

and when it is invisible, I want the following:

Label
Button
Button

but now i get:

Label
(empty space where edit caption was)
(empty space where edit box was)
Button
Button

Re: Show/hide edit in popup

PostPosted: 17 Mar 2014 11:08
by Alexander Bulei
Hi magosk,

magosk wrote:but now i get:

Label
(empty space where edit caption was)
(empty space where edit box was)
Button
Button


It have this behavior because property Visible, generate javascript to set the css property "visibility":

http://www.w3schools.com/cssref/pr_class_visibility.asp

http://www.w3schools.com wrote:The visibility property specifies whether or not an element is visible.

Tip: Even invisible elements take up space on the page. Use the "display" property to create invisible elements that do not take up space!


We will implement new property Display to support this behavior.

Best Regards.

Re: Show/hide edit in popup

PostPosted: 17 Mar 2014 14:42
by magosk
cgdevtools wrote:Hi magosk,

We will implement new property Display to support this behavior.

Best Regards.


Sounds great, thanks!

Re: Show/hide edit in popup

PostPosted: 18 Mar 2014 11:02
by Alexander Bulei
Hi magosk,

Implemented new property "Display" in V2.0.0.3417.

Best Regards.

Re: Show/hide edit in popup

PostPosted: 21 Mar 2014 10:01
by magosk
cgdevtools wrote:Hi magosk,

Implemented new property "Display" in V2.0.0.3417.

Best Regards.


I just tested the new 3425 build and the Display property seems to work fine, thanks!