Hide/Visible IWButton with template

<< Click to Display Table of Contents >>

Navigation:  Forum >

Hide/Visible IWButton with template

Forum link

 


 

05-21-2019, 06:58 AM:

 

I have IWButton in my Form with RenderVisibility=true. 

 

This button i have defined in HTML template {%IWButton%}.

 

I want one time hide button in another time visible this button with Event.

 

IWButton.Visible:=false / IWButton.Visible:=true;

 

Change other property? Why not work?!

 


 

05-21-2019, 07:18 PM:

 

(05-21-2019, 06:58 AM)matija Wrote: [ -> ]I have IWButton in my Form with RenderVisibility=true. 

 

This button i have defined in HTML template {%IWButton%}.

 

I want one time hide button in another time visible this button with Event.

 

IWButton.Visible:=false / IWButton.Visible:=true;

 

Change other property? Why not work?!

 

By RenderVisibility I assume you mean RenderInvisibleControls.  Set that to true for the containers(regions etc)/form of the control.

 

You should then be able to set the button to visible/hidden in events.

 

What are the symptoms?  IW/Delphi versions?  Does it initially show and won't disappear, or does it never appear?  More information please?

 

Do you have an example?

 

Dan

 


 

05-22-2019, 09:05 AM:

 

(05-21-2019, 06:58 AM)matija Wrote: [ -> ]I have IWButton in my Form with RenderVisibility=true. 

 

This button i have defined in HTML template {%IWButton%}.

 

I want one time hide button in another time visible this button with Event.

 

IWButton.Visible:=false / IWButton.Visible:=true;

 

Change other property? Why not work?!

 

Set 

 

IWButton.StyleRenderOptions.RenderVisibility := True;

 

IWTemplateProcessorHTML.RenderStyles := True;

 

It should work

 


 

05-23-2019, 09:42 AM:

 

(05-22-2019, 09:05 AM)Alexandre Machado Wrote: [ -> ] (05-21-2019, 06:58 AM)matija Wrote: [ -> ]I have IWButton in my Form with RenderVisibility=true. 

 

This button i have defined in HTML template {%IWButton%}.

 

I want one time hide button in another time visible this button with Event.

 

IWButton.Visible:=false / IWButton.Visible:=true;

 

Change other property? Why not work?!

 

Set 

 

IWButton.StyleRenderOptions.RenderVisibility := True;

 

IWTemplateProcessorHTML.RenderStyles := True;

 

It should work

 

Thx this work, however now disregard property button in css btn btn-success ! 

 

How my button {%IWButton%} form format in HTML template with btn btn-success?

 


 

05-23-2019, 11:29 AM:

 

Hi Matija, try to use ID, something like this:

 

Code:

 

<button class="btn btn-success" id="IWBUTTON" type="button"><i class="fa fa-search fa-fw" aria-hidden="true"></i></button>

 

The IWButton name is in UPPERCASE.

 


 

05-24-2019, 05:11 AM:

 

(05-23-2019, 11:29 AM)Jose Nilton Pace Wrote: [ -> ]Hi Matija, try to use ID, something like this:

 

Code:

 

<button class="btn btn-success" id="IWBUTTON" type="button"><i class="fa fa-search fa-fw" aria-hidden="true"></i></button>

 

The IWButton name is in UPPERCASE.

 

Thx work! 

 

Only not transfer Caption of IWButton for my multilanguage?