Jump to content

Form border color change


mehmet07

Recommended Posts

Hi,

How change form border color dynamically? 

 

I tried following, but not works  :( 

UniSession.AddJS('myformname.addCls('borderred');');

...

UniSession.AddJS('myformname.removeCls('borderred';);

 

Regards

 

This code works:

UniSession.AddJS(WebForm.JSName + '.addCls(''borderred'');');
...
UniSession.AddJS(WebForm.JSName + '.removeCls(''borderred'');');
  • Upvote 1
Link to comment
Share on other sites

 

This code works:

UniSession.AddJS(WebForm.JSName + '.addCls(''borderred'');');
...
UniSession.AddJS(WebForm.JSName + '.removeCls(''borderred'');');
 
Hi Semper. 
 
You can so, one operator without adding customCSS
 
UniSession.AddJS(WebForm.JSName + '.el.setStyle({"border": "solid 3px red"});');
  • Upvote 2
Link to comment
Share on other sites

  • 2 months later...

 

 
Hi Semper. 
 
You can so, one operator without adding customCSS
 
UniSession.AddJS(WebForm.JSName + '.el.setStyle({"border": "solid 3px red"});');

 

 

 

Try this on MainForm but I get an error :  MainForm as not JSName member.

Is WebForm a TUniForm or another component?

 

I want to hide the form border ...

 

thanks

 

PS: from Sencha forum to disabled the window border completely we need

Code:

Ext.onReady(function(){

var win = Ext.create('Ext.container.Container', {

layout: "fit",

modal: true,

floating: true,

border: false,

width: 502,

height: 402,

items: [{

border: false,

html: 'qqqqq'

}]

}).show();

});

 

How translate for Unigui js event or delhoi code?

Link to comment
Share on other sites

  • 3 years later...

Yes, I know.

 

But in that post, the solution is in customCSS, but not like this:

 

UniSession.AddJS(WebForm.JSName + '.el.setStyle({"border": "solid 3px red"});');

 

I need this for some forms, not for all forms.

 

Sorry if I didn't was clear.

Link to comment
Share on other sites

Yes, I know.

 

But in that post, the solution is in customCSS, but not like this:

 

UniSession.AddJS(WebForm.JSName + '.el.setStyle({"border": "solid 3px red"});');

 

I need this for some forms, not for all forms.

 

Sorry if I didn't was clear.

 

Ok, np

 

Maybe like this ?:

function window.afterrender(sender, eOpts)
{
    var me=this;
    Ext.get(me.el.select('.x-window-header-text').elements[0]).setStyle('color', 'white');
    Ext.get(me.el.select('.x-window-header').elements[0]).setStyle('background-color', 'green');
}
Link to comment
Share on other sites

  • 2 years later...

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • Create New...