erich.wanker Posted February 12, 2016 Share Posted February 12, 2016 i create a array of tuniPanels with meine_marker[x]:=TUniPanel.Create(self); i give the unipanels different css classes with UniSession.AddJS(meine_marker[x].JSName + '.addCls(''marker_1'');'); is it possible to give the unipanel different backgrounds?? i tryed out in css-file: background-image: url(bullet.png); .. but doesnt work... is it possible with "UniSession.AddJS(meine_marker[x].JSName +"... and somting else? ThanX for help Quote Link to comment Share on other sites More sharing options...
cristianotestai Posted February 12, 2016 Share Posted February 12, 2016 i create a array of tuniPanels with meine_marker[x]:=TUniPanel.Create(self); i give the unipanels different css classes with UniSession.AddJS(meine_marker[x].JSName + '.addCls(''marker_1'');'); is it possible to give the unipanel different backgrounds?? i tryed out in css-file: background-image: url(bullet.png); .. but doesnt work... is it possible with "UniSession.AddJS(meine_marker[x].JSName +"... and somting else? ThanX for help Hi, I have not tried, but try something like: UniSession.AddJS(meine_marker[x].JSName + '.addCls(''marker_1'');'); //add css class UniSession.AddJS(meine_marker[x].JSName + '.setStyle(''background-image", url("/yourpath/image.png"));'); //set css atributte Quote Link to comment Share on other sites More sharing options...
Sherzod Posted February 12, 2016 Share Posted February 12, 2016 Hi, Try: CSS: .tulips { background: url("files/tulips.jpg") } UniPanel1 ... function afterrender(sender, eOpts) { sender.body.addCls("tulips") } Or: UniSession.AddJS(UniPanel1.JSName + '.body.addCls(''tulips'')'); Best regards. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.