PB UI Controls Version 2.6.2 Now Available

With this release comes more toolbar enhancements. A new "Group" option has been added. This will allow you to group many toolbar items into one. An arrow will display next to the toolbar item. Once clicked, a drop menu will display all the toolbar items in that group. Clicking on one will envoke its clicked event and make it the default button on the group toolbar item.

This is how you use it. First you have to add a new group. Using the id's returned from of_AddGroup and of_AddItem, call of_AssignItemToGroup to put everything together. The of_SetGroupItem function will set the default button that's displayed in the group within the toolbar. If this method is not called, the last item added to the group will be displayed in the toolbar.

//Add menu toolbar items
Long ll_group, ll_b, ll_s, ll_o, ll_c
ll_group = uo_toolbarstrip.of_AddGroup()
ll_b = uo_toolbarstrip.of_AddItem('Blue','blue.bmp')
ll_s = uo_toolbarstrip.of_AddItem('Silver','silver.bmp')
ll_o = uo_toolbarstrip.of_AddItem('Olive','olive.bmp')
ll_c = uo_toolbarstrip.of_AddItem('Classic','classic.bmp')

uo_toolbarstrip.of_DisplayText(ll_group, TRUE)

//Assign new toolbar items to group
uo_toolbarstrip.of_AssignItemToGroup(ll_group,ll_b)
uo_toolbarstrip.of_AssignItemToGroup(ll_group,ll_s)
uo_toolbarstrip.of_AssignItemToGroup(ll_group,ll_o)
uo_toolbarstrip.of_AssignItemToGroup(ll_group,ll_c)

//Set the default group item
CHOOSE CASE uo_toolbarstrip.il_CurrentTheme
    CASE uo_toolbarstrip.BLUE
        uo_toolbarstrip.of_SetGroupItem (ll_group, ll_b)
    CASE uo_toolbarstrip.SILVER
        uo_toolbarstrip.of_SetGroupItem (ll_group, ll_s)
    CASE uo_toolbarstrip.OLIVE
        uo_toolbarstrip.of_SetGroupItem (ll_group, ll_o)
    CASE ELSE
        uo_toolbarstrip.of_SetGroupItem (ll_group, ll_c)
END CHOOSE

December 4, 2009 09:06 by bradwery
E-mail | Permalink | Comments (0) | Comment RSSRSS comment feed