Real Software Forums

The forum for Real Studio and other Real Software products.
[ REAL Software Website | Board Index ]
It is currently Tue Apr 25, 2017 11:23 am
xojo

All times are UTC - 5 hours




Post new topic Reply to topic  [ 5 posts ] 
Author Message
 Post subject: dynamically add a toolbar
PostPosted: Mon Feb 27, 2012 2:43 am 
Offline

Joined: Mon Feb 27, 2012 2:30 am
Posts: 3
Is it possible to dynamically add a toolbar to a window?


Top
 Profile  
 
 Post subject: Re: dynamically add a toolbar
PostPosted: Thu Mar 01, 2012 5:14 am 
Offline

Joined: Tue Feb 14, 2012 5:39 am
Posts: 99
Location: Austria
Yes and no.
Depends on your definition of "dynamically add".

If you want to add the whole toolbar in code, it wont work unless you add the toolbar to your window and set its visibility to false.

But if you only want to add buttons dynamically, then thats possible and wanted.

Just check the language reference and tutorials.
That will tell you how to add custom buttons and seperators to your toolbar.


Top
 Profile  
 
 Post subject: Re: dynamically add a toolbar
PostPosted: Thu Mar 01, 2012 1:21 pm 
Offline

Joined: Mon Feb 27, 2012 2:30 am
Posts: 3
Thank you for your reply.

I already studied the examples from Language Reference but i didn't find a solution for my pb. I have an application with several windows and several types of users. Each type of users has his specific toolbar and when he login his toolbar should be created and present in all windows. I succeeded to create the custom toolbar adding to windows an empty toolbar and fill it with ToolbarItems at login. But I don't know how to attach an custom (or maybe a global) Action event to the toolbars.


Top
 Profile  
 
 Post subject: Re: dynamically add a toolbar
PostPosted: Thu Mar 08, 2012 1:32 pm 
Offline

Joined: Thu Dec 01, 2011 2:13 pm
Posts: 288
Search in the reference for AddHandler.

_________________
Mac OS X 10.3-10.8
Windows 2000 (I know it sucks)
Windows Server 2007

You want a bunch of new classes and web styles? realstudiodevspot.com (search there for Web Styles Plugin)
Folderitem is too hard? File Bin Class
I hate cows.


Top
 Profile  
 
 Post subject: Re: dynamically add a toolbar
PostPosted: Thu Mar 22, 2012 9:46 am 
Offline

Joined: Mon Feb 27, 2012 2:30 am
Posts: 3
I use AddHandler and it works. Thank you.

But now I have an other issue. The actions associated with some toolbar items do the following sequence:
1. open an other window
2. close the current window
Strange the action works first time but if I repeat the operation the application open the second window but crash short time after open it. I think its happen because the toolbar is linked to the closed window but I don't know how to solve this issue. I need a mechanism similar to menu items events where the same sequence works.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 5 posts ] 

All times are UTC - 5 hours


Who is online

Users browsing this forum: No registered users and 4 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group