cristianotestai Posted July 12, 2011 Share Posted July 12, 2011 Hi, I tried to use some forms to handle the event OnMouseMove to UniPanels, but without sucess. What I need is to change the color and also the visibility of the some childs components, as UniImage and UniLabel. Something like: Sender.Color := '$00808040'; UniImage1.Visible := False; UniLabel1.Visible := False; Is there any simple example for this need? Quote Link to comment Share on other sites More sharing options...
Administrators Farshad Mohajeri Posted July 12, 2011 Administrators Share Posted July 12, 2011 To achieve this you need to be familiar with Ext JS framework. Please see Ext JS API docs for details. http://dev.sencha.co...ext-3.3.1/docs/ For example for changing visibility we have hide(). sender.hide(); or MainForm.UniLabel1.hide(); For changing color you need to call el.setStyle() with proper parameters but it may not work for all elements. Quote Link to comment Share on other sites More sharing options...
cristianotestai Posted July 13, 2011 Author Share Posted July 13, 2011 To achieve this you need to be familiar with Ext JS framework. Please see Ext JS API docs for details. http://dev.sencha.co...ext-3.3.1/docs/ For example for changing visibility we have hide(). sender.hide(); or MainForm.UniLabel1.hide(); For changing color you need to call el.setStyle() with proper parameters but it may not work for all elements. Hi Farshad.. Examining the Ext JS Api in document # http://dev.sencha.com/deploy/ext-3.3.1/docs/source/Element.style.html#method-Ext.Element-setStyle method, I tried to identify the correct object name and value to change the color value for the UniPanel. I tried the following commands, among others, but none worked: (Onmouseover Event) sender.el.setStyle ('backgroundColor', 'rgb(12, 83.131)'); sender.el.setStyle ('backgroundColor', '#F26F51'); sender.el.setStyle ('background-Color', 'rgb(12, 83.131)'); sender.el.setStyle ('background-Color', '#F26F51'); Something wrong? Quote Link to comment Share on other sites More sharing options...
Administrators Farshad Mohajeri Posted July 13, 2011 Administrators Share Posted July 13, 2011 For UniPanel: function Onmouseover(sender) { sender.body.applyStyles('background-color:#ff0000'); } Quote Link to comment Share on other sites More sharing options...
cristianotestai Posted July 13, 2011 Author Share Posted July 13, 2011 For UniPanel: function Onmouseover(sender) { sender.body.applyStyles('background-color:#ff0000'); } Tks Farshad, I did not know that used the property body to apply the style for Panel. Gradually I will know the EXT framework. Thanks again for your help. 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.