View Single Post
09-18-14, 06:41 PM   #4
benots4
A Fallenroot Satyr
AddOn Author - Click to view addons
Join Date: Aug 2009
Posts: 20
That didn't work either. In the function below v is set by the scroll bar. Here are screen shots.
After init before scrolling:
Post Scroll :

code:
Code:
function ShowGroupMemberList(v)
	local MLheight = 210
	local MLWidth = 355
	local MLyoffset = - tt:GetHeight() -10   -- offset from the bottom of the main frame 
	local showOffline = (GetGuildRosterShowOffline() and true or false);
	local pInfoArray = GetGuildMemberList(showOffline);
	local GroupMemberList = GGCreateFrame(LT3GuildRoster, "MemberList", "TOPLEFT", 0, MLyoffset, MLWidth, MLheight, LT3GuildRoster);
	GroupMemberList:Show();

	local displayRows = 14
	local displayRowHeight = 16
	local ofsx = 110
	local ofsy = 0	
	local rowFrames = {}
	
	local function CreateRow(i)
		local f = CreateFrame("Button", nil, GroupMemberList) -- Doesn't need a global name.
		f:SetWidth(300)
		f:SetHeight(16)
		if i == 1 then
			f:SetPoint("TOPLEFT", GroupMemberList, ofsx, -ofsy)
		else
			f:SetPoint("TOPLEFT", rowFrames[i-1], "BOTTOMLEFT")
		end
		local text = f:CreateFontString(nil, "OVERLAY") -- Doesn't need a global name.
		text:SetPoint("LEFT")
		text:SetPoint("RIGHT")
		text:SetJustifyH("LEFT")
		text:SetFont(STANDARD_TEXT_FONT, 12, "OUTLINE")
		text:SetTextColor(1, 1, 1, 1)
		f:SetFontString(text) -- This is why it's a Button instead of a plain Frame,
		-- so you can now :SetText on the Button itself.
		f:SetID(i)
		rowFrames[i] = f
		return f
	end

	if v < 1 then v = 1 end
	for i = 1, displayRows  do
		local name = pInfoArray[v].Name;
		if pInfoArray[v].Class and pInfoArray[v].Class:upper() ~= "UNKNOWN" then
			name = "\124cFF"..(pInfoArray[v].Online and GuildRole_Class_Colors[pInfoArray[v].Class:upper()] or "808080")..pInfoArray[v].Name.."\124r";
		end		
		local row = rowFrames[i] or CreateRow(i,rowFrames ,ofsx, ofsy)
		row:SetText(name)
		v=v+1
	end
	
end
  Reply With Quote