Modernisez vos Applications PowerBuilder

Barre d'outil Bandeau

Positionnez où vous le désirez une barre d'outil dans n’importe quel user object ou fenêtre, sans utiliser d'objet menu.
Avec Toolbar Strip vous pouvez :

  • Aligner les boutons à gauche et/ou à droite.
  • Afficher le texte à côté ou sous l’image du bouton.
  • Grouper les items similaires dans un menu déroulant.
  • Changer le style visuel.
  • Récupérer 4 thèmes prêts à l’emploi.
  • Définir la taille : petite, moyenne, grande ou très grande.
  • Définir une orientation verticale ou horizontale.
  • Ajouter des contrôles comme des listes déroulantes et des lignes simples à éditer.
  • Définir des infos bulles pour chaque bouton.
  • Changer l’aspect du bouton pour qu’il apparaisse comme sélectioné.

Implémentation

//Open Event of window that contains the control
//Or the post constructor event of the userobject that contains the control 
//Add items to the toolbar
uo_1.of_AddItem('Copy','Copy!')
uo_1.of_AddItem('Paste','Paste!')
uo_1.of_AddSeparator()
uo_1.of_AddItem('First Row','VCRFirst!')
uo_1.of_AddItem('Prior Row','VCRPrior!')
uo_1.of_AddObject('', em_1)
uo_1.of_AddItem('Next Row','VCRNext!')
uo_1.of_AddItem('Last Row','VCRLast!') 

 //Display text with image
uo_1.of_DisplayText(TRUE)

 //THE FOLLOWING CODE ADDS A TOOLBAR ITEM WITH DROP MENU
//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