Difference between revisions of "TD5x User Interface"

From Team Developer SqlWindows Wiki
Jump to: navigation, search
(Created article about RACON.SQLWindows.UserInterface enhancement library)
 
m
 
(15 intermediate revisions by 3 users not shown)
Line 1: Line 1:
'''This page covers miscellaneous TD 5.x User Interface tips & tricks.'''
+
{{PageHeader|TD 5.x and higher : user interface}}
 +
 
  
 
__TOC__
 
__TOC__
<br>
+
 
  
 
<!------------------------------------------------------------------------------------------------------------------------------>
 
<!------------------------------------------------------------------------------------------------------------------------------>
{{TipHeader|RACON.SQLWindows.UserInterface - UI enhancement library}}
+
{{TipHeader|Menu Bar vs. Ribbon Bar under the hood}}
With Team Developer 5.1, Unify introduced the new user interface drawing engine [http://wwwprof-uis.com/ Prof-UIS] which provides a nice way to support multiple themes and introduces some very useful new controls.<br/>
+
The possibility to create a Ribbon Bar is one of the features that allows us to improve our TD applications look and feel.<br/>
Some of them already got introduced into Team Developer.<br/>
+
But is it done by setting <b>bMenuBarAsRibbonBar</b> to TRUE? No!<br/>
But currently, Team Developer 5.1 with Service Pack 5, not all features of the controls provided by Prof-UIS are accessible through built in Sal-functions, so I decided to give it a try to use the Prof-UIS library delivered with Team Developer directly, to be able to access additional properties and methods.<br/>
+
Beside rearranging the Menu Items and adding nice images, there is another very important thing to keep in mind, if you switch to Ribbon Bars.<br/>
I'm glad, that it basically worked and some additional styles of the controls are now accessible.<br/>
+
You know, that there is this nice capability of defining <b>Enabled When</b> expressions to enable and disable Menu Items.<br/>
<br/>
+
But do you know, how often those expressions are evaluated?<br/>
You can see a screenshot of the sample application here:<br/>
+
 
[[Image:RACON.SQLWindows.UserInterface_Screenshot.jpg]]
+
 
<br/><br/>
+
When using the Menu Bar, they are evaluated right before the Menu Item gets displayed.<br/>
The main thing I wanted to have, is the possibility to modify the image and text alignment of buttons.<br/>
+
The following image shows this.<br/>
I'm glad that this works now.<br/>
+
 
After that worked, I tried to use methods of other controls too, which also basically worked.<br/>
+
 
<br/><br/>
+
[[Image:MenuEnabledWhenBehaviourMenu.jpg]]
This library is meant to be an enhancement to Team Developer until the features are available there.<br/>
+
 
After all of the features are - hopefully - available through Sal-functions, this module will go away.<br/>
+
 
<br/><br/>
+
But if you use the Ribbon Bar, they get evaluated MUCH MUCH MUCH MORE OFTEN!<br>
<font color="#ff0000"><b>PLEASE NOTE, THAT THE FUNCTIONS INSIDE THE MODULE ARE FULLY EXPERIMENTAL AND CURRENTLY ONLY TESTED AGAINST TEAM DEVELOPER 5.1 SERVICE PACK 5. YOU MAY USE IT IN YOU APPLICATIONS FOR FREE, BUT EXTENSIVE TESTING IN YOUR ENVIRONMENT IS ABSOLUTELY NECESSARY!!!</b></font>
+
 
<br/><br/>
+
 
You can get the file here: [http://samples.tdcommunity.net/index.php?dir=TD5x_specific/&file=RACON.SQLWindows.UserInterface.zip RACON.SQLWindows.UserInterface 1.0]
+
[[Image:MenuEnabledWhenBehaviourRibbon.jpg]]
 +
 
 +
 
 +
So the advice is: <b>Don't use expensive expressions to control your menu behavior!</b><br>
 +
This could really decrease your applications performance a lot!<br>
 +
Instead you should use simple variables to store the Menu Item state and add them as the Enabled When expression.<br>
 +
You'll also face debugging issues, as the execution will step into your Enabled When evaluation functions (if any), during debug.
 +
 
 +
 
 +
Just try using this application and play around to see what this article is about!<br/>
 +
{{Download
 +
|URL=http://samples.tdcommunity.net/index.php?dir=TD5x_specific/&file=MenuEnabledWhenBehaviour.zip
 +
|TEXT=MenuEnabledWhenBehaviour.zip
 +
}}

Latest revision as of 09:46, 16 July 2013

TD 5.x and higher : user interface


Contents


Pointer2.png Menu Bar vs. Ribbon Bar under the hood Pointer.png

The possibility to create a Ribbon Bar is one of the features that allows us to improve our TD applications look and feel.
But is it done by setting bMenuBarAsRibbonBar to TRUE? No!
Beside rearranging the Menu Items and adding nice images, there is another very important thing to keep in mind, if you switch to Ribbon Bars.
You know, that there is this nice capability of defining Enabled When expressions to enable and disable Menu Items.
But do you know, how often those expressions are evaluated?


When using the Menu Bar, they are evaluated right before the Menu Item gets displayed.
The following image shows this.


MenuEnabledWhenBehaviourMenu.jpg


But if you use the Ribbon Bar, they get evaluated MUCH MUCH MUCH MORE OFTEN!


MenuEnabledWhenBehaviourRibbon.jpg


So the advice is: Don't use expensive expressions to control your menu behavior!
This could really decrease your applications performance a lot!
Instead you should use simple variables to store the Menu Item state and add them as the Enabled When expression.
You'll also face debugging issues, as the execution will step into your Enabled When evaluation functions (if any), during debug.


Just try using this application and play around to see what this article is about!
Down.png MenuEnabledWhenBehaviour.zip