PBDR.COM

About   -   Contact   -   Purchase   -   Search   -   What's New

 
 
Dynamic Tab Mask Colour
In PBBrowse I create tabs dynamically based on the kind of object being displayed. I add an icon to each tab and wanted the icons grey colour to be matched to the windows system button face colour. PowerBuilder does not do this automatically but with a little code you can easily achieve this effect. The code below is an extra from the routine showing the creation of the tab and then the assignment of the picture and color mask. Note the colour mask MUST be set first otherwise the mask will not take effect when the picture is set:
	tab_obj.OpenTab( iuo_TabPages[ ll_L ], 0 )
	iuo_TabPages[ ll_L ].picturemaskcolor = 12632256 // GREY/SILVER
	iuo_TabPages[ ll_L ].Text = is_ObjTypes[ ll_J ]
	iuo_TabPages[ ll_L ].BackColor = this.BackColor
	iuo_TabPages[ ll_L ].PictureName = ls_Pics[ ll_K ]
 

Top of Page

Legal Notice

Ken Howe 2011