Sherzod Posted November 21, 2013 Posted November 21, 2013 Hi All! Does anyone know, how to set the width at the UniMainMenu, (with word-wrap...)? Sincerely... Quote
Sherzod Posted November 22, 2013 Author Posted November 22, 2013 Hi All! Does anyone know, how to set the width at the UniMainMenu, (with word-wrap...)? Sincerely... more precisely width UniMenuItem Quote
rullomare Posted November 22, 2013 Posted November 22, 2013 Hi , I believe that the problem is not having the ability to access the properties of the jsname of UniMainMenu and UniMenuItem. Only for demonstration purposes, I have tried the following code: in my example >> O3B is the Jsname of UniMainMenu procedure TMainForm.UniFormCreate(Sender: TObject); begin unisession.addjs( 'O3B.nm="O3B";_cdo_("O3B",O3B,null,MainForm);' + '_coe_(MainForm,"O3B",null,"beforerender",function(sender) {sender.height = 60;});') ; end; this works Regards, Salvatore Marullo Quote
Sherzod Posted November 23, 2013 Author Posted November 23, 2013 in my example >> O3B is the Jsname of UniMainMenu Hi rullomare! Thank you for your response. How did you know that "O3B", this is UniMainMenu? Thank you ... Quote
rullomare Posted November 23, 2013 Posted November 23, 2013 hi Delphi Developer, simple, from js code generated by unigui in this example O32 is UniMainMenu O3A and O3F are UniMenuItem O32=new Ext.toolbar.Toolbar({id:"O32_id",height:26,items:[O3A,O3F]}); O3F=new Ext.button.Button({id:"O3F_id",text:"Test1"}); O3A=new Ext.button.Button({id:"O3A_id",text:"Test2"}); As I said this is only applicable for demonstration test, definitely not for production. 1) Start your program, looks for Jsname of UniMainMenu in Js generate code 2) change your code and add procedure TMainForm.UniFormCreate(Sender: TObject); begin unisession.addjs( 'O32.nm="O32";_cdo_("O32",O32,null,MainForm);' + '_coe_(MainForm,"O32",null,"beforerender",function(sender) {sender.height = 60;});') ; end; 3) Compile and Run : It work !!! 2 . Solution ( not tested 100% ) Add Type TZMainMenu = class(TuniMainMenu) ; ..... ........ Var JsnameMainMenu : string ; JsnameMainMenu := TZMainMenu(unimainmenu1).GetMenuControl.JSName ; // unimainmenu1 is the name of TuniMainMenu component. ============================================================================= P.S. honestly do not know how complicated is for Mr. Farshad to add the Property JSName for UniMainMenu and UniMenuItem , definitely the best solution. Regards. Salvatore Marullo 1 Quote
Sherzod Posted November 24, 2013 Author Posted November 24, 2013 Thank you very much, I'll try... Quote
Sherzod Posted November 25, 2013 Author Posted November 25, 2013 Hi All! Does anyone know, how to set the width at the UniMainMenu, (with word-wrap...)? Sincerely... I think, to set the width UniMenuItem, easier to use caption with "<br>" Sincerely ... Quote
rullomare Posted November 25, 2013 Posted November 25, 2013 Hi, probably the best solution at this time !! Regards Quote
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.