PML Customisation
User Guide
Gadgets and their Attributes
: Icons on Tabs
Icons on Tabs
To set an icon on a given tab within a tabset you must import the
Aveva.Core.Presentation
assembly using the following PML.NET command:
import 'Aveva.Core.Presentation'
handle any
endhandle
Having done this you can create an object of type PMLNETDRUID using the following PML.NET syntax:
using namespace 'Aveva.Core.Presentation'
!druid = object PMLNETDRUID()
You can then can use the druid object to access the method setAttribute() passing the attribute UI_PICTURE_FILE and the resource id to the given frame
!druid.setAttribute('testTabIcon.testFrame1', 'UI_PICTURE_FILE', 'ID_3D-REPRESENTATION')
For example in the following form, !!testTabIcon, you have a tabset with a frame !!testTabIcon.testFrame1 with an icon id 'ID_3D-REPRESENTATION'
Note:
Icons can be referenced in the same way as adding a pixmap to a button, for example, resourcename>id.
setup form !!testTabIcon resize
frame .flist TABSET at x 0 ymax+0.2 anchor T+B+L width 30 height 5
frame .testFrame1 'TAB1'
button .testButton1 anchor top+left |Test Button1| pixmap "AvevaSharedIcons>ID_REMOVE_ENTRY>16" width 16 height 16
para .testLabel anchor t+l+r text 'Test Label ' width 38
using namespace 'Aveva.Core.Presentation'
!druid = object PMLNETDRUID()
!druid.SetAttribute('!!TestTabIcon.testFrame1','UI_PICTURE_FILE','ID_3D-REPRESENTATION')
1974 to current year.
AVEVA Solutions Limited and its subsidiaries. All rights reserved.