Difference between revisions of "TD5x User Interface"

From Team Developer SqlWindows Wiki
Jump to: navigation, search
m (Moved RACON articles to their own page)
m
 
Line 1: Line 1:
'''This page covers miscellaneous TD 5.x/6.x User Interface tips & tricks.'''
+
{{PageHeader|TD 5.x and higher : user interface}}
 +
 
  
 
__TOC__
 
__TOC__
<br>
+
 
  
 
<!------------------------------------------------------------------------------------------------------------------------------>
 
<!------------------------------------------------------------------------------------------------------------------------------>
Line 11: Line 12:
 
You know, that there is this nice capability of defining <b>Enabled When</b> expressions to enable and disable Menu Items.<br/>
 
You know, that there is this nice capability of defining <b>Enabled When</b> expressions to enable and disable Menu Items.<br/>
 
But do you know, how often those expressions are evaluated?<br/>
 
But do you know, how often those expressions are evaluated?<br/>
<br/>
+
 
 +
 
 
When using the Menu Bar, they are evaluated right before the Menu Item gets displayed.<br/>
 
When using the Menu Bar, they are evaluated right before the Menu Item gets displayed.<br/>
 
The following image shows this.<br/>
 
The following image shows this.<br/>
<br>
+
 
 +
 
 
[[Image:MenuEnabledWhenBehaviourMenu.jpg]]
 
[[Image:MenuEnabledWhenBehaviourMenu.jpg]]
<br>
+
 
<br>
+
 
 
But if you use the Ribbon Bar, they get evaluated MUCH MUCH MUCH MORE OFTEN!<br>
 
But if you use the Ribbon Bar, they get evaluated MUCH MUCH MUCH MORE OFTEN!<br>
<br>
+
 
 +
 
 
[[Image:MenuEnabledWhenBehaviourRibbon.jpg]]
 
[[Image:MenuEnabledWhenBehaviourRibbon.jpg]]
<br>
+
 
<br>
+
 
So the advice is: <b>Don't use expensive expressions to control your menu behaviour!</b><br>
+
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>
 
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>
 
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.<br/>
+
You'll also face debugging issues, as the execution will step into your Enabled When evaluation functions (if any), during debug.
<br/>
+
 
 +
 
 
Just try using this application and play around to see what this article is about!<br/>
 
Just try using this application and play around to see what this article is about!<br/>
[http://samples.tdcommunity.net/index.php?dir=TD5x_specific/&file=MenuEnabledWhenBehaviour.zip MenuEnabledWhenBehaviour.zip]<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