You can load themes in an InfoConnect 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 InfoConnect .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 InfoConnect 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 InfoConnect .NET API events.
Indicate which InfoConnect terminal user control has focus |
Copy Code
|
---|---|
private string themePath = @"C:\Users\" + Environment.UserName + @"\Documents\Micro Focus\InfoConnect\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"); } |