View Single Post
08/19/14, 06:31 AM   #3
circonian
AddOn Author - Click to view addons
Join Date: May 2014
Posts: 613
Originally Posted by merlight View Post
Just thinking: <AnchorFill /> on the background woudln't work? If it's a child of the menubar, and the menubar has correct size, it should, no?
The MenuBarBackground is a child of the menuBar & AnchorFill does not give any errors, but then you cant see the background.

Anchor fill would make the MenuBarBackground the same size as the menu bar, which is the same size as the buttons (their total area)....and the buttons are on top, so they would completely cover the MenuBarBackground and you'd never see it.

This is why I wanted to anchor in opposite corners of the menu bar (since I don't know the menu bars dimensions) I want to anchor in opposite corners and use the offset to stretch it out a little further to make it visible around the edges.

This is what I WOULD LIKE TO DO:
Lua Code:
  1. -- This is what I want to do, anchor to an offset, in diagonal corners so I don't need to know --
  2. -- the size of the menu bar & so I can stretch it out larger than the menu bar, to be visible --
  3.  
  4. -- Stretches it out 75 left & 75 up from the TOPLEFT corner of the menu bar --
  5. menuBarBg:SetAnchor(TOPLEFT, _cMenuBar, TOPLEFT, -75, -75)
  6.  
  7. -- Stretches it out 75 right & 75 down from the BOTTOMRIGHT corner of the menu bar --
  8. menuBarBg:SetAnchor(BOTTOMRIGHT, _cMenuBar, BOTTOMRIGHT, 75, 75)
  Reply With Quote