You can load themes in a Reflection Terminal User Control (TUC) at runtime. This can be useful when you want to indicate which TUC has focus on forms that have more than one TUC. This example uses the Reflection .NET API Theme object to dynamically load themes in IBM terminal user controls when the focus changes.
In this example, the TUC on the left has focus, as indicated by the theme with the black background.
Note: The Reflection TUC support for Windows user control events is limited to the Focus events. To handle mouse, keyboard, or rendering events on the TUC, use the Reflection .NET API events.
Indicate which Reflection terminal user control has focus |
Copy Code
|
---|---|
private string themePath = @"C:\Users\" + Environment.UserName + @"\Documents\Micro Focus\Reflection\Themes\"; private void ibmTerminalControl1Focus(object sender, EventArgs e) { ibmTerminalControl1.IbmTerminal.Theme.Load(themePath + "active3270.themex"); ibmTerminalControl2.IbmTerminal.Theme.Load(themePath + "inactive3270.themex"); } private void ibmTerminalControl2Focus(object sender, EventArgs e) { ibmTerminalControl1.IbmTerminal.Theme.Load(themePath + "inactive3270.themex"); ibmTerminalControl2.IbmTerminal.Theme.Load(themePath + "active3270.themex"); } |