CGDevTools Forum

Welcome to the Official CGDevTools Support Community Forums.

Show/hide edit in popup

by magosk » 28 Feb 2014 15:59

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.
magosk
 
Posts: 181
Joined: 07 Oct 2013 08:41

by Alexander Bulei » 03 Mar 2014 11:01

Hi magosk,

It seems to have issue with visible property of JQMEdit.

We will fix it right now.

Thanks.

Best Regards.
Group: Developers | Support Team

  • info [at] cgdevtools.com - General information
  • sales [at] cgdevtools.com - Sales department
  • support [at] cgdevtools.com - Product and Technical Support
User avatar
Alexander Bulei
Site Admin
 
Posts: 3635
Joined: 15 May 2012 08:52
Location: Mealhada, Portugal

by magosk » 14 Mar 2014 14:39

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.
magosk
 
Posts: 181
Joined: 07 Oct 2013 08:41

by Jorge Sousa » 14 Mar 2014 15:11

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.
Best Regards
CGDevTools Develop / Support Team
Home Page: http://www.cgdevtools.com
Jorge Sousa
 
Posts: 4261
Joined: 17 May 2012 09:58

by magosk » 17 Mar 2014 09:26

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
magosk
 
Posts: 181
Joined: 07 Oct 2013 08:41

by Alexander Bulei » 17 Mar 2014 11:08

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.
Group: Developers | Support Team

  • info [at] cgdevtools.com - General information
  • sales [at] cgdevtools.com - Sales department
  • support [at] cgdevtools.com - Product and Technical Support
User avatar
Alexander Bulei
Site Admin
 
Posts: 3635
Joined: 15 May 2012 08:52
Location: Mealhada, Portugal

by magosk » 17 Mar 2014 14:42

cgdevtools wrote:Hi magosk,

We will implement new property Display to support this behavior.

Best Regards.


Sounds great, thanks!
magosk
 
Posts: 181
Joined: 07 Oct 2013 08:41

by Alexander Bulei » 18 Mar 2014 11:02

Hi magosk,

Implemented new property "Display" in V2.0.0.3417.

Best Regards.
Group: Developers | Support Team

  • info [at] cgdevtools.com - General information
  • sales [at] cgdevtools.com - Sales department
  • support [at] cgdevtools.com - Product and Technical Support
User avatar
Alexander Bulei
Site Admin
 
Posts: 3635
Joined: 15 May 2012 08:52
Location: Mealhada, Portugal

by magosk » 21 Mar 2014 10:01

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!
magosk
 
Posts: 181
Joined: 07 Oct 2013 08:41


Return to JQMPopup

cron

Who is online

Users browsing this forum: No registered users and 1 guest

Contact Us.