Dyalog / ewc-client

Other
1 stars 4 forks source link

Add support for ImageListObj/ImageIndex in Ribbon family of objects #175

Closed mkromberg closed 5 months ago

mkromberg commented 6 months ago

We have added ImageListObj as a new Ribbon property – run DemoRibbonTab2 to test:

{"WC":{"ID":"F1.TC.SF3.Ribbon","Properties":{"BCol":[134,171,220],"FCol":[255,255,255],"ImageListObj":"IL","Type":"Ribbon"}}}

And ImageIndex to the leaf objects RibbonButton and RibbonButtonGroup:

{"WC":{"ID":"F1.TC.SF3.Ribbon.Item1","Properties":{"BorderCol":[192,192,192],"Size":1,"Title":"Archive","Type":"RibbonGroup"}}} {"WC":{"ID":"F1.TC.SF3.Ribbon.Item1.GroupItem1","Properties":{"Size":[12],"Type":"RibbonGroupItem"}}}

// Note the first RibbonButton still uses “Icon” – this should still work: {"WC":{"ID":"F1.TC.SF3.Ribbon.Item1.GroupItem1.ArchiveButton","Properties":{"Caption":"Archive","Event":[["Select",""]],"Icon":"FcKindle","Size":[12],"Type":"RibbonButton"}}} {"WC":{"ID":"F1.TC.SF3.Ribbon.Item2","Properties":{"BorderCol":[192,192,192],"Size":1,"Title":"Date","Type":"RibbonGroup"}}} {"WC":{"ID":"F1.TC.SF3.Ribbon.Item2.GroupItem1","Properties":{"Size":[12],"Type":"RibbonGroupItem"}}}

// The rest of the children use ImageIndex: {"WC":{"ID":"F1.TC.SF3.Ribbon.Item2.GroupItem1.DateButton","Properties":{"Caption":"Red","Event":[["Select",""]],"ImageIndex":1,"Size":12,"Type":"RibbonButton"}}} {"WC":{"ID":"F1.TC.SF3.Ribbon.Item3","Properties":{"BorderCol":[192,192,192],"Size":1,"Title":"Exchange","Type":"RibbonGroup"}}} {"WC":{"ID":"F1.TC.SF3.Ribbon.Item3.GroupItem1","Properties":{"Size":[12],"Type":"RibbonGroupItem"}}} {"WC":{"ID":"F1.TC.SF3.Ribbon.Item3.GroupItem1.StockExchangeButton","Properties":{"Caption":"Green","Event":[["Select",""]],"ImageIndex":2,"Size":12,"Type":"RibbonButton"}}} {"WC":{"ID":"F1.TC.SF3.Ribbon.Item4","Properties":{"BorderCol":[192,192,192],"Size":3,"Title":"Shares","Type":"RibbonGroup"}}} {"WC":{"ID":"F1.TC.SF3.Ribbon.Item4.GroupItem1","Properties":{"Size":[12],"Type":"RibbonGroupItem"}}}

// For a RibbonButtonGroup, ImageIndex is a list: {"WC":{"ID":"F1.TC.SF3.Ribbon.Item4.GroupItem1.ButtonGroup1","Properties":{"Captions":["Green","Blue"],"Event":[["Select",""]],"ImageIndex":[3,2],"Type":"RibbonButtonGroup"}}} {"WC":{"ID":"F1.TC.SF3.Ribbon.Item5","Properties":{"BorderCol":[192,192,192],"Size":6,"Title":"Analysis","Type":"RibbonGroup"}}} {"WC":{"ID":"F1.TC.SF3.Ribbon.Item5.GroupItem1","Properties":{"Size":[12],"Type":"RibbonGroupItem"}}} {"WC":{"ID":"F1.TC.SF3.Ribbon.Item5.GroupItem1.ButtonGroup1","Properties":{"Captions":["Red","Green","Blue"],"Event":[["Select",""]],"ImageIndex":[1,2,3],"Type":"RibbonButtonGroup"}}}