History | Log In     View a printable version of the current page.  
Please note that Jira will be offline Saturday July 26, 2008 from 3:00 AM to 6:00 AM EDT (GMT -4) for scheduled maintenance.
Issue Details (XML | Word | Printable)

Key: CNFG-34
Type: New Feature New Feature
Status: Closed Closed
Resolution: Fixed
Priority: Minor Minor
Assignee: William (kandoko)
Reporter: William (kandoko)
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
Configator

Allow scroll frame columns to be resized, by right clicking and sliding to desired width

Created: 22/Feb/08 08:28 PM   Updated: 01/May/08 05:53 PM
Component/s: GUI
Affects Version/s: None
Fix Version/s: None


 Description  « Hide
Added feature to allow the scroll frames columns to be adjusted in width.
To implement this in any addon making use of scrollframes .. make the following changes.
http://www.nogdev.pastey.net/82799

frame.imageview.sheet = ScrollSheet:Create(frame.imageview, {
{ "Item", "TEXT", 105 },
}, nil, nil, nil, private.onResize) --nils are place holders for teh optional onEnter, onLeave, onClick scripts used with teh "TOOLTIP" style

--add this function into the module
function private.onResize(column, name, frame)
local originalScript = frame.labels[column].button:GetScript("OnMouseDown") --store the original Sort onclick script will reset it when we are done resizing
local point, relativeTo, relativePoint, xOfs, yOfs = frame.labels[column].button:GetPoint() --Store the anchor point since its niled when resizing the button
--limit the size we will allow buttons to get
local width = frame.labels[column].button:GetWidth()
local height = frame.labels[column].button:GetHeight()
frame.labels[column].button:SetResizable(true)
frame.labels[column].button:SetMaxResize(400, height)
frame.labels[column].button:SetMinResize(10, height)
--set the resize script
frame.labels[column].button:SetScript("OnMouseDown", function() frame.labels[column].button:StartSizing(frame.labels[column].button) end)
--resets the original onclick as well as setting new anchor points for our buttons
frame.labels[column].button:SetScript("OnMouseUp", function()
frame.labels[column].button:StopMovingOrSizing()
frame.labels[column].button:SetScript("OnMouseDown", originalScript)
frame.labels[column].button:ClearAllPoints()
frame.labels[column].button:SetPoint(point, relativeTo, relativePoint, xOfs,yOfs)
end)
--start resizing frame
frame.labels[column].button:StartSizing(frame.labels[column].button)
end

--This is a per session change unless teh module stores the new widths to be applied on the next startup

 All   Comments   Change History   FishEye      Sort Order:
William (kandoko) - 22/Feb/08 08:38 PM
r69 added the beta of this functionality.

William (kandoko) - 10/Apr/08 08:50 PM
r83 merges the script code into configator, module is now sent a (self, column, new width) event whenever columns are resized.