Language:
Lua     Change language:
Pastebin: 82799
Author: Anonymous
Subject: Untitled
Created: 2008-02-22 20:17:29
Download and save
Toggle line numbers
1--change scrollframe creation code from this 
2frame.imageview.sheet = ScrollSheet:Create(frame.imageview, { 
3        { "Item",   "TEXT", 105 }
4        { "Seller", "TEXT", 75  }
5        { "Left",   "INT",  40  }
6        { "Stk",    "INT",  30  }
7        { "Min/ea", "COIN", 85, { DESCENDING=true } }
8        { "Cur/ea", "COIN", 85, { DESCENDING=true } }
9        { "Buy/ea", "COIN", 85, { DESCENDING=true, DEFAULT=true } }
10        { "MinBid", "COIN", 85, { DESCENDING=true } }
11        { "CurBid", "COIN", 85, { DESCENDING=true } }
12        { "Buyout", "COIN", 85, { DESCENDING=true } }
13    }
14 
15-to this 
16 
17frame.imageview.sheet = ScrollSheet:Create(frame.imageview, { 
18        { "Item",   "TEXT", 105 }
19        { "Seller", "TEXT", 75  }
20        { "Left",   "INT",  40  }
21        { "Stk",    "INT",  30  }
22        { "Min/ea", "COIN", 85, { DESCENDING=true } }
23        { "Cur/ea", "COIN", 85, { DESCENDING=true } }
24        { "Buy/ea", "COIN", 85, { DESCENDING=true, DEFAULT=true } }
25        { "MinBid", "COIN", 85, { DESCENDING=true } }
26        { "CurBid", "COIN", 85, { DESCENDING=true } }
27        { "Buyout", "COIN", 85, { DESCENDING=true } }
28    }, nil, nil, nil, private.onResize) 
29 
30--add function private.onResize to any module 
31 
32function private.onResize(column, name, frame) 
33        local originalScript = frame.labels[column].button:GetScript("OnMouseDown") --store the original Sort onclick script will reset it when we are done resizing 
34        local point, relativeTo, relativePoint, xOfs, yOfs = frame.labels[column].button:GetPoint() --Store the anchor point since its niled when resizing the button 
35        --limit the size we will allow buttons to get 
36        local width = frame.labels[column].button:GetWidth() 
37        local height = frame.labels[column].button:GetHeight() 
38        frame.labels[column].button:SetResizable(true
39        frame.labels[column].button:SetMaxResize(400, height) 
40        frame.labels[column].button:SetMinResize(10, height) 
41        --set the resize script    
42        frame.labels[column].button:SetScript("OnMouseDown", function() frame.labels[column].button:StartSizing(frame.labels[column].button) end
43        --resets the original onclick as well as setting new anchor points for our buttons 
44        frame.labels[column].button:SetScript("OnMouseUp", function() 
45                                    frame.labels[column].button:StopMovingOrSizing() 
46                                    frame.labels[column].button:SetScript("OnMouseDown", originalScript) 
47                                    frame.labels[column].button:ClearAllPoints() 
48                                    frame.labels[column].button:SetPoint(point, relativeTo, relativePoint, xOfs,yOfs) 
49                    end
50        --start resizing frame             
51        frame.labels[column].button:StartSizing(frame.labels[column].button) 
52    end 
53 
54 
Download and save
Toggle line numbers
Thread:
[82799] Untitled by Anonymous at 2008-02-22 20:17:29
Tip: Click the line numbers to toggle highliting on that line.

Paste followup:

Language:
Author:
Subject:


    Tabstop:     bigger biggest
Note: You can prefix a line with "@@@" to highlight it.