A very powerful feature of Topobase is the use of attribute forms.
A significant amount of functionality exists in Topobase Administrator to format these forms in various ways, such as using different components, splitting attributes between tabs, specifying labels and so on.
But there's limited functionality to adjust the colors or fonts for all forms. You can use a static Picture Control and use this as a Background picture behind the other Controls, but this involves editing each attribute form separately.
For desktop operation you can access and set the underlying Windows form properties for all forms by using a DialogPlugIn as the following code illustrates.
///
/// Sample DialogPlugIn to change the background colour.
///
public class FormattingDialogPlugIn : Topobase.Forms.DialogPlugIn
{
private readonly Color COLOUR = System.Drawing.Color.AliceBlue;
public override void OnOpened (object sender, System.EventArgs args)
{
Form form;
Control active;
TabControl tabs;
base.OnOpened (sender, args);
if (Application.IsDesktop)
{
form = Dialog.Desktop.DockInForm;
form.BackColor = COLOUR;
foreach (Control control in form.Controls)
control.BackColor = COLOUR;
active = form.ActiveControl;
active.BackColor = COLOUR;
tabs = active as TabControl;
foreach (TabPage page in tabs.TabPages)
page.BackColor = COLOUR;
form.PerformLayout ();
}
}
}
This code runs when the form is opened. It checks that the application environment is 'desktop', and then adjusts the background color for the form. This will adjust all forms, but you could be more selective by checking for a specific feature class or classes using the Dialog.FeatureClass property.
If you use this technique to adjust fonts, be aware that the position of the labels will not change, so you should choose the same font size to avoid a formating issues.
A link to download a ZIP file of a complete project using this code can be found below. A pre-built binary is included. To install these binaries, copy the FormattingDialogPlugIn.dll and FormattingDialogPlugIn.tbp files to the Topobase Client bin directory and the Topobase Administrator bin directory.
To build this project, define the environment variable TopobaseClientDirectory to point to the Topobase Client directory and execute the solution file:
C:>set TopobaseClientDirectory=C:\Program Files\Autodesk Topobase Client 2009
C:>FormattingDialogPlugIn.sln
Download FormattingDialogPlugIn