Thread Tools Display Modes
08-15-11, 02:29 PM   #1
cokedrivers
A Rage Talon Dragon Guard
 
cokedrivers's Avatar
AddOn Author - Click to view addons
Join Date: Aug 2009
Posts: 325
Panel Stretching Full Width of screen

Hello again,
I'm trying to get my custom Datapanel stretch from sreenedge to screenedge. Below are the screenshots & code for what im using.

1280x800



1280x1024


Now here is the code to get the Width of the datapanel:
Code:
DataBorderPanel:SetWidth(GetScreenWidth() * UIParent:GetEffectiveScale())
As you can see by the screen shots above the 1280x800 stretches almost all the way across the screen but my native resolution 1280x1024 does not.

is there a better way to make this happen?

Thanks for any help with this issue.

Coke
  Reply With Quote
08-15-11, 03:05 PM   #2
Verttex
Super Monkey
 
Verttex's Avatar
AddOn Author - Click to view addons
Join Date: Jan 2010
Posts: 297
I personally think it looks better like that.
__________________
  Reply With Quote
08-15-11, 03:23 PM   #3
Mischback
A Cobalt Mageweaver
 
Mischback's Avatar
AddOn Author - Click to view addons
Join Date: Aug 2009
Posts: 221
DataBorderPanel:SetPoint('LEFT', UIParent, 'LEFT', 0, 0)
DataBorderPanel:SetPoint('RIGHT', UIParent, 'RIGHT', 0, 0)

and don't care about the actual width?
__________________
  Reply With Quote
08-15-11, 03:34 PM   #4
Seerah
Fishing Trainer
 
Seerah's Avatar
WoWInterface Super Mod
Featured
Join Date: Oct 2006
Posts: 10,860
DataBorderPanel:SetPoint('TOPLEFT', UIParent, 'TOPLEFT', 0, 0)
DataBorderPanel:SetPoint('TOPRIGHT', UIParent, 'TOPRIGHT', 0, 0)

Mischback meant ^^
__________________
"You'd be surprised how many people violate this simple principle every day of their lives and try to fit square pegs into round holes, ignoring the clear reality that Things Are As They Are." -Benjamin Hoff, The Tao of Pooh

  Reply With Quote
08-15-11, 04:17 PM   #5
cokedrivers
A Rage Talon Dragon Guard
 
cokedrivers's Avatar
AddOn Author - Click to view addons
Join Date: Aug 2009
Posts: 325
Originally Posted by Seerah View Post
DataBorderPanel:SetPoint('TOPLEFT', UIParent, 'TOPLEFT', 0, 0)
DataBorderPanel:SetPoint('TOPRIGHT', UIParent, 'TOPRIGHT', 0, 0)

Mischback meant ^^
Thank you both very much that worked like a charm.
  Reply With Quote
08-15-11, 07:48 PM   #6
cokedrivers
A Rage Talon Dragon Guard
 
cokedrivers's Avatar
AddOn Author - Click to view addons
Join Date: Aug 2009
Posts: 325
Instead of Starting a new Thread i figured i would ust add another question here.

i'm tying to now move the player frame down (in .lua i know i can do it in-game but i would rather have everyone at the same spot) so here are a few codes i have found online but none seems to move it besides one and if i get into a vehicle then it dont reset back to were i had it.

First code:
(works for the most part)
Code:
	hooksecurefunc("PlayerFrame_ResetPosition", function(self)
		self:ClearAllPoints()
		self:SetPoint("TOPLEFT", -19, -20)
	end)
2nd code:
(does not work)
Code:
	PlayerFrame:ClearAllPoints()
	PlayerFrame:SetPoint("TOPLEFT", -19, -20)
3rd code:
(this one moves my targetframe but will not move the playerframe)
Code:
	local pf = PlayerFrame
	pf:ClearAllPoints()
	pf:SetPoint("TOPLEFT", -19, -20)
So here i be with 3 codes and none accually work correctly. I know 2 of them are pretty much the same thing but hey cant blame me for trying.

Thanks for anyhelp with this.

Coke
  Reply With Quote

WoWInterface » Developer Discussions » Lua/XML Help » Panel Stretching Full Width of screen


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off