|
YOUR FEEDBACK
Did you read today's front page stories & breaking news?
SYS-CON.TV SYS-CON.TV WEBCASTS |
POWERBUILDER LINKS YOU MUST CLICK ON Tips & Tools Office 2003 Toolbar A New Look For Your Old PowerBuilder App
There's a reason why software developers like Microsoft update the look of their applications every two years
By: Brad Wery
Oct. 24, 2005 02:30 PM
There's a reason why software developers like Microsoft update the look of their applications every two years. It shows the consumer that something has changed and therefore they need to upgrade, at least that's my opinion.
Unfortunately, most developers are usually confined to creating applications with the look provided by the development tool they're using. Fortunately for us developers, some people don't like this kind of confinement. We all know who Aart Onkenhout is: the creator of CoolMenu. For those who are unaware, CoolMenu is a utility that allows us to update the look of the menus in our applications by adding color and bitmaps. It also provides style options: XP and Office 2003, for example. Personally I like the Office 2003 style. What I don't like is the contrast between the new menu and the old toolbar. During my last personal programming challenge I needed to display some dropdowns on my application's toolbar. Of course, in order to achieve this, you would have to create your own. I now had the opportunity to upgrade my application's toolbar to match my new Office 2003 menu. Before I started developing, I had to accept the fact that it would not behave exactly like the toolbars do in other applications. My goal was to make it as similar as possible.
The Toolbar When looking at the source you will find three main objects:
This is where the magic happens. Your application can have many toolbars. In order to have the numerous toolbars work well together, they need to be managed. Below is a list of functions and an explanation as to how they manage and manipulate the open toolbars:
w_toolbar contains a lot of generic code. Most of the code is used to control the toolbar's visual effects and behaviors. After running the sample application you'll notice several things:
Repositioning the toolbar is achieved by sending a move message to w_toolbar when the handle is clicked. The move message will process until the left-mouse button is released. Consequently the toolbar can be dropped anywhere so it's important to reposition it so that it displays properly and orderly. This is done by calling of_ArrangeToolbars in the toolbar manager. If you drag the toolbar out of the toolbar area, it floats. Once a toolbar floats, a title is displayed letting you know its name\window title. You can determine if it's floating by calling of_IsDocked. When a toolbar item is pressed, a user event on dw_1 called ue_buttonclicked is triggered. This event has one argument passed to it: the name of the toolbar item clicked. In this event you would most likely code a case statement triggering menu items as necessary. If you have data entry fields on the toolbar, use the DataWindows itemchanged event to determine the next course of action.
Toolbar - d_toolbar... YOUR FEEDBACK
PBDJ LATEST STORIES . . .
SUBSCRIBE TO THE WORLD'S MOST POWERFUL NEWSLETTERS SUBSCRIBE TO OUR RSS FEEDS & GET YOUR SYS-CON NEWS LIVE!
|
SYS-CON FEATURED WHITEPAPERS MOST READ THIS WEEK BREAKING POWERBUILDER / SYBASE NEWS
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||