CodeThatXPBar User Manual 

  DEFINITION of XPBar and BAR'S ITEMS POSITION

CodeThatXPBar supports an ability of absolute and relative positioning.

"position": { "absolute" : true, "pos":[200,40] }

In this example the bar is created with absolute positioning and we put it at the point (200, 40). When "absolute" property is set in false, it means the menu is created with relative positioning.

The following example illustrates the case of center positioning of the bar:

"position": { "absolute" : false, "align":"center" }

Also you can

  • specify item width/height (size property),
  • define text alignment - left/right/center/middle (align property)
  • set default item's offset (itemoffset property)
  • specify bar size in case you'd like to set non-default values that were calculated automatically (fixwidth/fixheight properties)

For example see the following:

"style": 
{ 
	"size":[100,25],
	"align":"center",
	"itemoffset":{ "x":5, "y":1 },
	"fixheight":250
}

  EXAMPLE - XPBar and XPBar's items Positioning

You can see an example and complete code here - XPBar and XPBar's items Positioning Example

Read more about CodeThatXPBar >>