This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

DEVELOPERS FORUM - Help needed getting Toolbar

fli - Wednesday, October 19, 2011 7:35 AM:

Hallo wise members,

 

On a form, I have a button onClick event. Running a Javascript method,

which should disable the Unlock button on the toolbar.

I have tried this:   

xxxx could be a mix of: top.aras.parent.document.thisItem.Item.this.forms.windows  ???

________code___________

var toolbar = xxxx.xxxx.GetActiveToolbar()

var buttons = toolbar.GetButtons( " | ");

ect.__________________________

Question is, what should I put instead of the xxxx

reference http://wwww.aras.comhttp://www.aras.com/Community/forums/p/1517/4865.aspx

Thanks  Christoffer

 



justinlee - Thursday, October 20, 2011 5:00 AM:

Hi Christoffer!

You can use

var toolbarX = parent.toolbar.GetActiveToolbar();

 

 



fli - Friday, October 21, 2011 6:38 AM:

justinlee,

Thanks for your answer, but I get an error saying   'parent.toolbar' is null or not an object. I must be missing something.

Christoffer



justinlee - Tuesday, October 25, 2011 10:49 PM:

Hi Christoffer!

Sorry for my last Answer!

You can you code bellow

var toolbarX = parent.tearoff_menu.toolbar.GetActiveToolbar();
var buttons = toolbarX.GetButtons( " | ");

P/s: Sorry my english

Lee



fli - Wednesday, November 23, 2011 6:48 AM:

Lee,

Thank you

Christoffer



fli - Friday, December 9, 2011 7:20 AM:

Hi Lee

Can you help me getting the main Toolbars when in the main window.

do you also know where this method should run from.  (like a onformpopulate)

thank you very much

Christoffer



justinlee - Friday, December 9, 2011 10:57 PM:

Hi Christoffer!

I don't understand your question!

Are you want get Toolbar from mainWindow from button in the form?

P/s: Sorry my English



fli - Thursday, December 22, 2011 5:03 AM:

Lee,

First off, thanks for your help.

I am in the process of cleaning up the toolbars.

I would like to hide some buttons for a group of users.

The method you provided do this from a OnFormPopulate on the Item forms.

Now I need to clean up the toolbar on the main window.

If I could have a method on OnFormPopulate on the main window. doing this ?

/ Christoffer