Jump to content

Form border color change


mehmet07
 Share

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.

 

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...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...