home *** CD-ROM | disk | FTP | other *** search
/ CD Actual Thematic 25: Programming / pc_actual_25.iso / Basic / GridOne / setup.EXE / CCOLORCOMBO.CLS < prev    next >
Encoding:
Visual Basic class definition  |  2001-09-09  |  16.9 KB  |  519 lines

  1. VERSION 1.0 CLASS
  2. BEGIN
  3.   MultiUse = -1  'True
  4.   Persistable = 0  'NotPersistable
  5.   DataBindingBehavior = 0  'vbNone
  6.   DataSourceBehavior  = 0  'vbNone
  7.   MTSTransactionMode  = 0  'NotAnMTSObject
  8. END
  9. Attribute VB_Name = "CColorCombo"
  10. Attribute VB_GlobalNameSpace = False
  11. Attribute VB_Creatable = True
  12. Attribute VB_PredeclaredId = False
  13. Attribute VB_Exposed = False
  14. Attribute VB_Ext_KEY = "SavedWithClassBuilder6" ,"Yes"
  15. Attribute VB_Ext_KEY = "Top_Level" ,"Yes"
  16. '-----------------------------------------------------------------------------
  17. ' This is a part of the BeeGrid ActiveX control.
  18. ' Copyright ⌐ 2000 Stinga
  19. ' All rights reserved.
  20. '
  21. ' You have a right to use and distribute the BeeGrid sample files in original
  22. ' form or modified, provided that you agree that Stinga has no warranty,
  23. ' obligations, or liability for any sample application files.
  24. '-----------------------------------------------------------------------------
  25. Option Explicit
  26.  
  27. Private WithEvents SGGrid As SGGrid
  28. Attribute SGGrid.VB_VarHelpID = -1
  29. Private marColors(63) As Long
  30. Private marWebColors() As String
  31.  
  32. Private Const CELL_WIDTH = 260
  33. Private Const CELLS_BORDER_WIDTH = 45
  34. Private Const TAB_WIDTH = 43
  35.    
  36. Implements IsgGridCustomDraw
  37.  
  38. Private rcTab As RECT
  39.  
  40. Private miCurrent As Integer
  41.  
  42. Public Event GetColor(lColor As OLE_COLOR)
  43.  
  44.  
  45. Const WEB_COLORS = "Aliceblue#16775408;" & _
  46.    "Antiquewhite#14150650;Aqua#16776960;Aquamarine#13959039;Azure#16777200;Beige#14480885;Bisque#12903679;Black#0;Blanchedalmond#13495295;Blue#16711680;Blueviolet#14822282;" & _
  47.    "Brown#2763429;Burlywood#8894686;Cadetblue#10526303;Chartreuse#65407;Chocolate#1993170;Coral#5275647;Cornflower#15570276;Cornsilk#14481663;Crimson#3937500;Cyan#16776960;" & _
  48.    "Darkblue#9109504;Darkcyan#9145088;Darkgoldenrod#755384;Darkgray#11119017;Darkgreen#100;Darkkhaki#7059389;Darkmagenta#9109643;Darkolivegreen#3107669;Darkorange#36095;Darkorchid#13382297;" & _
  49.    "Darkred#139;Darksalmon#8034025;Darkseagreen#9157775;Darkslateblue#9125192;Darkslategray#5197615;Darkturquoise#13749760;Darkviolet#148;Deeppink#9639167;Deepskyblue#16760576;Dimgray#6908265;" & _
  50.    "Dodgerblue#16748574;Firebrick#2237106;Floralwhite#15792895;Forestgreen#2263842;Fuchsia#16711935;Gainsboro#14474460;Ghostwhite#16775416;Gold#55295;Goldenrod#2139610;Gray#8421504;" & _
  51.    "Green#128;Greenyellow#3145645;Honeydew#15794160;Hotpink#11823615;Indianred#6053069;Indigo#8519755;Ivory#15794175;Khaki#9234160;Lavender#16443110;Lavenderblush#16118015;" & _
  52.    "Lawngreen#64636;Lemonchiffon#13499135;Lightblue#15128749;Lightcoral#8421616;Lightcyan#16777184;Lightgoldenrodyellow#13826810;Lightgreen#9498256;Lightgray#13882323;Lightpink#12695295;Lightsalmon#8036607;" & _
  53.    "Lightseagreen#11186720;Lightskyblue#16436871;Lightslategray#10061943;Lightsteelblue#14599344;Lightyellow#14745599;Lime#65280;Limegreen#3329330;Linen#15134970;Magenta#16711935;Maroon#128;" & _
  54.    "Mediumaquamarine#11193702;Mediumblue#13434880;Mediumorchid#13850042;Mediumpurple#14381203;Mediumseagreen#7451452;Mediumslateblue#15624315;Mediumspringgreen#10156544;Mediumturquoise#13422920;Mediumvioletred#8721863;Midnightblue#7346457;" & _
  55.    "Mintcream#16449525;Mistyrose#14804223;Moccasin#11920639;Navajowhite#11394815;Navy#32896;Oldlace#15136253;Olive#32896;Olivedrab#2330219;Orange#42495;Orangered#17919;" & _
  56.    "Orchid#14053594;Palegoldenrod#11200750;Palegreen#10025880;Paleturquoise#15658671;Palevioletred#9662683;Papayawhip#14020607;Peachpuff#12180223;Peru#4163021;Pink#13353215;Plum#14524637;" & _
  57.    "Powderblue#15130800;Purple#8388736;Red#255;Rosybrown#9408444;Royalblue#9464129;Saddlebrown#1262987;Salmon#7504122;Sandybrown#6333684;Seagreen#5737262;Seashell#15660543;" & _
  58.    "Sienna#2970272;Silver#12632256;Skyblue#15453831;Slateblue#13458026;Slategray#9470064;Snow#16448255;Springgreen#8388352;Steelblue#11829830;Tan#9221330;Teal#8421504;" & _
  59.    "Thistle#14204888;Tomato#4678655;Turquoise#13688896;Violet#15631086;Wheat#11788021;White#16777215;Whitesmoke#16119285;Yellow#65535;Yellowgreen#3329434"
  60.  
  61.  
  62.  
  63.  
  64.  
  65. Private Sub InitColors()
  66.    Const PAL_COLORS = "255,255,255;255,192,192;255,224,192;255,255,192;192,255,192;" & _
  67.       "192,255,255;192,192,255;255,192,255;224,224,224;255,128,128;255,192,128;255,255,128;" & _
  68.       "128,255,128;128,255,255;128,128,255;255,128,255;192,192,192;255,0,0;255,128,0;255,255,0;" & _
  69.       "0,255,0;0,255,255;0,0,255;255,0,255;128,128,128;192,0,0;192,64,0;192,192,0;0,192,0;" & _
  70.       "0,192,192;0,0,192;192,0,192;64,64,64;128,0,0;128,64,0;128,128,0;0,128,0;0,128,128;0,0,128;" & _
  71.       "128,0,128;0,0,0;64,0,0;128,64,64;64,64,0;0,64,0;0,64,64;0,0,64;64,0,64"
  72.    Dim arAllColors() As String
  73.    Dim arCurColor() As String
  74.    Dim i As Integer
  75.    
  76.    arAllColors = Split(PAL_COLORS, ";")
  77.    
  78.    For i = 0 To UBound(arAllColors)
  79.       arCurColor = Split(arAllColors(i), ",")
  80.       marColors(i) = RGB(arCurColor(0), arCurColor(1), arCurColor(2))
  81.    Next
  82.    
  83.    For i = UBound(arAllColors) + 1 To UBound(marColors)
  84.       marColors(i) = vbWhite
  85.    Next
  86. End Sub
  87.  
  88.  
  89. Private Sub ReturnColor()
  90.    If miCurrent = 0 Then
  91.       RaiseEvent GetColor(SGGrid.CurrentCell.Style.BackColor)
  92.    Else
  93.       RaiseEvent GetColor(CLng(SGGrid.CurrentCell.Value))
  94.    End If
  95.    SGGrid.Visible = False
  96. End Sub
  97.  
  98. Private Sub SetPallete()
  99.    Dim i As Integer, j As Integer, iColor As Integer
  100.    Dim cell As SGCell
  101.    
  102.    With SGGrid
  103.       .Styles.RemoveAll
  104.       .Columns.RemoveAll True
  105.       .GridLines = sgGridLineFlat
  106.       .FocusRect = sgFocusRectSolid
  107.       .ScrollBars = sgSBNone
  108.       .SpecialMode = sgModeNone
  109.       .FitLastColumn = False
  110.       .HeadingColCount = 0
  111.       .HeadingRowCount = 0
  112.       .SelectionMode = sgSelectionNone
  113.       .BackColor = vbButtonFace
  114.       
  115.       .DataColCount = 10
  116.       .DataRowCount = 9
  117.       
  118.       For i = 1 To 8
  119.          With .Rows.At(i)
  120.             .Height = CELL_WIDTH
  121.             .Style.Borders = sgCellBorderAll
  122.             .Style.BorderSize = 1
  123.             .Style.BorderColor = vbButtonShadow
  124.             For j = 1 To 8
  125.                .Cells(j).Style.BackColor = marColors(iColor)
  126.                iColor = iColor + 1
  127.             Next
  128.          End With
  129.          With .Columns.At(i)
  130.             .Width = CELL_WIDTH
  131.             .Style.Borders = sgCellBorderAll
  132.             .Style.BorderSize = 1
  133.             .Style.BorderColor = vbButtonShadow
  134.          End With
  135.       Next
  136.       
  137.       For i = 0 To 9 Step 9
  138.          With .Columns.At(i)
  139.             .Width = CELLS_BORDER_WIDTH
  140.             .Style.BackColor = vbButtonFace
  141.             .AllowFocus = False
  142.             .Style.Borders = sgCellNoBorder
  143.          End With
  144.       Next
  145.       
  146.       With .Rows.At(0)
  147.          .Height = CELLS_BORDER_WIDTH
  148.          .Style.BackColor = vbButtonFace
  149.          .AllowFocus = False
  150.          For Each cell In .Cells
  151.             cell.Style.Borders = sgCellNoBorder
  152.          Next
  153.       End With
  154.       .Col = 1
  155.       .Row = 1
  156.    End With
  157. End Sub
  158.  
  159. Private Sub SetWebColor()
  160.    Dim ar As SGArray
  161.    Dim i As Long
  162.    
  163.    Dim arc() As String
  164.  
  165.    With SGGrid
  166.       .Styles.RemoveAll
  167.       .Columns.RemoveAll True
  168.       .FitLastColumn = True
  169.       .DataRowCount = 0
  170.       .DataRowCount = UBound(marWebColors) + 1
  171.       .DataColCount = 1
  172.       .ScrollBars = sgSBVertical
  173.       .GridLines = sgGridLineNone
  174.       .FocusRect = sgFocusRectDotted
  175.       .SpecialMode = sgModeListBox
  176.       .SelectionMode = sgSelectionByRow
  177.       .BackColor = vbWhite
  178.       .FlatScrollBars = sgSBEncartaMode
  179.       
  180.       With .Columns.At(0)
  181.          .Style.Format = "FormatText Event"
  182.          .Style.CustomDraw = sgDrawAfterCellBkg
  183.       End With
  184.       Set ar = .Array
  185.    End With
  186.    
  187.    For i = 0 To UBound(marWebColors)
  188.       arc = Split(marWebColors(i), "#")
  189.       ar.Value(i, 0) = arc(1)
  190.    Next
  191.  
  192.    Set ar = Nothing
  193. End Sub
  194.  
  195.  
  196. Private Sub SetSysColor()
  197.    Dim ar As SGArray
  198.    Dim i As Long
  199.  
  200.    With SGGrid
  201.       .Styles.RemoveAll
  202.       .Columns.RemoveAll True
  203.       .FitLastColumn = True
  204.       .DataRowCount = 0
  205.       .DataRowCount = 25
  206.       .DataColCount = 1
  207.       .ScrollBars = sgSBVertical
  208.       .GridLines = sgGridLineNone
  209.       .FocusRect = sgFocusRectDotted
  210.       .SpecialMode = sgModeListBox
  211.       .SelectionMode = sgSelectionByRow
  212.       .BackColor = vbWhite
  213.       .FlatScrollBars = sgSBEncartaMode
  214.       
  215.       With .Columns.At(0)
  216.          .Style.Format = "FormatText Event"
  217.          .Style.CustomDraw = sgDrawAfterCellBkg
  218.       End With
  219.       Set ar = .Array
  220.    End With
  221.    
  222.    For i = 0 To 24
  223.       ar.Value(i, 0) = GetSysColor(i)
  224.    Next
  225.  
  226.    Set ar = Nothing
  227. End Sub
  228.  
  229.  
  230.  
  231. Public Sub Show(Left As Single, Top As Single)
  232.    SGGrid.Move Left, Top
  233.    SGGrid.Visible = True
  234.    SGGrid.SetFocus
  235. End Sub
  236.  
  237. Private Sub Class_Initialize()
  238.    InitColors
  239.    marWebColors = Split(WEB_COLORS, ";")
  240. End Sub
  241.  
  242. Private Sub Class_Terminate()
  243.    Set SGGrid = Nothing
  244. End Sub
  245.  
  246.  
  247. Private Sub IsgGridCustomDraw_DrawCell(ByRef drawInfo As sgGridCustomDraw, _
  248.                                        response As sgCustomDrawResponse)
  249.    Dim hPen As Long
  250.    Dim hOldPen As Long
  251.    Dim sData As String
  252.  
  253.    response = sgDoDefault
  254.    
  255.    ' Ignore heading cells
  256.    If drawInfo.Heading <> 0 Then Exit Sub
  257.    
  258.    If drawInfo.DrawStage = sgDrawAfterCellBkg Then
  259.       If drawInfo.ColIndex = 1 Then
  260.          ' Draw left positioned color box and adjust content rect
  261.          ' so grid's default painting will not overwrite our color box
  262.          ' Get color
  263.          Dim clr As Long
  264.          
  265.          clr = CLng(drawInfo.Data)
  266.             
  267.          ' Draw rectangle
  268.          DrawRectangle drawInfo.DC, clr, drawInfo.Left + 4, drawInfo.Top + 2, _
  269.                                           drawInfo.Left + (drawInfo.Bottom - drawInfo.Top), drawInfo.Bottom - 2
  270.                                           
  271.          drawInfo.Left = drawInfo.Left + 26
  272.       End If
  273.    End If
  274. End Sub
  275.  
  276.  
  277. Private Sub IsgGridCustomDraw_DrawGridBkg( _
  278.    drawInfo As sgGridCustomDraw, _
  279.    response As sgCustomDrawResponse)
  280.  
  281.    Dim hBrush As Long, i%, sText As String
  282.    Dim plf As LOGFONT, hFont&, hfontOld&
  283.    Dim lBtnStyle As Long, lBtnFlag As Long
  284.    
  285.    Dim rc As RECT
  286.    
  287.    If drawInfo.DrawStage = sgDrawAfterGridCaption Then
  288.       SetFonts plf
  289.       
  290.       hFont = CreateFontIndirect(plf)
  291.       hfontOld = SelectObject(drawInfo.DC, hFont)
  292.       
  293.       rc.Left = drawInfo.Left + 3
  294.       rc.Top = drawInfo.Top + 2
  295.       rc.Right = drawInfo.Left + TAB_WIDTH
  296.       rc.Bottom = drawInfo.Bottom - 5
  297.       rcTab = rc
  298.       
  299.       For i = 0 To 2
  300.          lBtnStyle = IIf(i = miCurrent, BDR_RAISEDINNER, BDR_SUNKENOUTER)
  301.          lBtnFlag = IIf(i = miCurrent, BF_TAB, BF_RECT)
  302.          
  303.          DrawEdge drawInfo.DC, rc, lBtnStyle, lBtnFlag
  304.          
  305.          sText = Choose(i + 1, "Pallete", "System", "Web")
  306.          Call DrawText(drawInfo.DC, sText, Len(sText), rc, _
  307.             DT_CENTER Or DT_SINGLELINE Or DT_VCENTER)
  308.          rc.Left = rc.Right
  309.          rc.Right = rc.Left + TAB_WIDTH
  310.       Next
  311.       
  312.       rc.Top = -9
  313.       rc.Right = drawInfo.Right + 2
  314.       DrawEdge drawInfo.DC, rc, BDR_SUNKENOUTER, BF_BOTTOM
  315.       rc.Left = 0: rc.Right = 6
  316.       DrawEdge drawInfo.DC, rc, BDR_SUNKENOUTER, BF_BOTTOM + BF_LEFT
  317.       'delete fonts
  318.       Call SelectObject(drawInfo.DC, hfontOld)
  319.       Call DeleteObject(hFont)
  320.    End If
  321.    
  322.    response = sgDoDefault
  323. End Sub
  324.  
  325. Private Sub SetFonts(plf As LOGFONT)
  326.    Dim i%, byLett As Byte
  327.    Const FONT_NAME = "MS Sans Serif"
  328.    
  329.    For i = 0 To 32
  330.       plf.lfFaceName(i) = 0
  331.    Next
  332.    
  333.    For i = 0 To Len(FONT_NAME) - 1
  334.       byLett = Asc(Mid$(FONT_NAME, i + 1, 1))
  335.       plf.lfFaceName(i) = byLett
  336.    Next
  337.    
  338.    plf.lfHeight = 13
  339.    plf.lfWeight = 400
  340.  
  341. End Sub
  342.  
  343.  
  344.  
  345.  
  346.  
  347. Private Sub SGGrid_DblClick()
  348.    
  349.    If miCurrent = 0 Then
  350.       If (SGGrid.MouseCol < 1 Or SGGrid.MouseCol > 8) Or _
  351.          SGGrid.MouseRow < 1 Then Exit Sub
  352.    Else
  353.       If SGGrid.MouseCol = -1 Or SGGrid.MouseRow = -1 Then Exit Sub
  354.    End If
  355.    
  356.    ReturnColor
  357. End Sub
  358.  
  359. Private Sub SGGrid_FormatText(ByVal RowKey As Long, ByVal ColIndex As Long, ByVal CellKind As sgCellKind, Value As Variant)
  360.    Dim iRowPos As Integer
  361.  
  362.    iRowPos = SGGrid.Rows(RowKey).Position
  363.    
  364.    If miCurrent = 1 Then
  365.       Select Case iRowPos
  366.          Case COLOR_SCROLLBAR: Value = "Scroll Bars"
  367.          Case COLOR_BACKGROUND: Value = "Desktop"
  368.          Case COLOR_ACTIVECAPTION: Value = "Active Title Bar"
  369.          Case COLOR_INACTIVECAPTION: Value = "Inactive Title Bar"
  370.          Case COLOR_MENU: Value = "Menu Bar"
  371.          Case COLOR_WINDOW: Value = "Window Background"
  372.          Case COLOR_WINDOWFRAME: Value = "Window Frame"
  373.          Case COLOR_MENUTEXT: Value = "Menu Text"
  374.          Case COLOR_WINDOWTEXT: Value = "Window Text"
  375.          Case COLOR_CAPTIONTEXT: Value = "Active Title Bar Text"
  376.          Case COLOR_ACTIVEBORDER: Value = "Active Border"
  377.          Case COLOR_INACTIVEBORDER: Value = "Inactive Border"
  378.          Case COLOR_APPWORKSPACE: Value = "Application Workspace"
  379.          Case COLOR_HIGHLIGHT: Value = "Highlight"
  380.          Case COLOR_HIGHLIGHTTEXT: Value = "Highlight Text"
  381.          Case COLOR_BTNFACE: Value = "Button Face"
  382.          Case COLOR_BTNSHADOW: Value = "Button Shadow"
  383.          Case COLOR_GRAYTEXT: Value = "Disabled Text"
  384.          Case COLOR_BTNTEXT: Value = "Button Text"
  385.          Case COLOR_INACTIVECAPTIONTEXT: Value = "Inactive Title Bar Text"
  386.          Case COLOR_BTNHIGHLIGHT: Value = "Button Highlight"
  387.          Case COLOR_3DDKSHADOW: Value = "Button Dark Shadow"
  388.          Case COLOR_3DLIGHT: Value = "Button Light Shadow"
  389.          Case COLOR_INFOTEXT: Value = "ToolTip Text"
  390.          Case COLOR_INFOBK: Value = "ToolTip"
  391.       End Select
  392.    ElseIf miCurrent = 2 Then
  393.       Dim iPos As Integer
  394.       
  395.       iPos = InStr(marWebColors(iRowPos), "#")
  396.       Value = Left$(marWebColors(iRowPos), iPos - 1)
  397.    End If
  398. End Sub
  399.  
  400. Private Sub SGGrid_KeyDown(KeyCode As Integer, Shift As Integer)
  401.    If KeyCode = vbKeyReturn Then ReturnColor
  402.    
  403.    If KeyCode = vbKeyTab And Shift = vbCtrlMask Then
  404.       miCurrent = IIf(miCurrent = 0, 1, 0)
  405.       
  406.       If miCurrent = 0 Then
  407.          SetPallete
  408.       Else
  409.          SetSysColor
  410.       End If
  411.       
  412.       SGGrid.Redraw
  413.    End If
  414. End Sub
  415.  
  416. Private Sub SGGrid_LostFocus()
  417.    SGGrid.Visible = False
  418. End Sub
  419.  
  420.  
  421. Private Sub SGGrid_MouseDown( _
  422.    Button As Integer, Shift As Integer, _
  423.    x As Single, Y As Single)
  424.    
  425.    On Error Resume Next
  426.    
  427.    If miCurrent = 0 And Button = 2 Then
  428.       Dim lRowKey As Long, cell As SGCell
  429.       Dim sColKey As String
  430.       
  431.       If SGGrid.HitTestEx(x, Y, lRowKey, sColKey, sgCellStandard) = sgHitCell Then
  432.          Set cell = SGGrid.cell(lRowKey, sColKey)
  433.          
  434.          If (cell.Row.Position = 7 Or cell.Row.Position = 8) And _
  435.             (cell.Column.Position > 0 And cell.Column.Position < 9) Then
  436.             Dim oCommDlg As Object
  437.             
  438.             Set oCommDlg = CreateObject("MSComDlg.CommonDialog")
  439.             
  440.             oCommDlg.CancelError = True
  441.             oCommDlg.ShowColor
  442.             If Err = 0 Then
  443.                cell.Style.BackColor = oCommDlg.Color
  444.                marColors(cell.Row.Position * 8 - (8 - cell.Column.Position) - 1) = _
  445.                   oCommDlg.Color
  446.                cell.Redraw
  447.             End If
  448.             Set oCommDlg = Nothing
  449.          End If
  450.          
  451.          Set cell = Nothing
  452.       End If
  453.    End If
  454. End Sub
  455.  
  456. Private Sub SGGrid_MouseUp(Button As Integer, Shift As Integer, x As Single, Y As Single)
  457.    If SGGrid.HitTest(x, Y) = sgHitCaption Then
  458.       Dim xpx As Long, ypx As Long
  459.       Dim rc As RECT, i%
  460.       
  461.       xpx = x / Screen.TwipsPerPixelX
  462.       ypx = Y / Screen.TwipsPerPixelY
  463.       rc = rcTab
  464.       
  465.       For i = 0 To 2
  466.          If PtInRect(rc, xpx, ypx) <> 0 Then
  467.             If miCurrent <> i Then
  468.                miCurrent = i
  469.                If miCurrent = 0 Then
  470.                   SetPallete
  471.                ElseIf miCurrent = 1 Then
  472.                   SetSysColor
  473.                ElseIf miCurrent = 2 Then
  474.                   SetWebColor
  475.                End If
  476.             End If
  477.             SGGrid.Redraw
  478.             Exit Sub
  479.          End If
  480.          rc.Left = rc.Right
  481.          rc.Right = rc.Left + TAB_WIDTH
  482.       Next
  483.    End If
  484. End Sub
  485.  
  486.  
  487.  
  488. Public Property Get Grid() As SGGrid
  489.    Set Grid = SGGrid
  490. End Property
  491.  
  492. Public Property Set Grid(ByVal vNewValue As SGGrid)
  493.    Dim lCaptionHeight As Long
  494.  
  495.    Set SGGrid = vNewValue
  496.    
  497.    Set SGGrid.PaintObject = Me
  498.    
  499.    With SGGrid
  500.       .Visible = False
  501.       .ZOrder 0
  502.       .CustomBkgDraw = sgDrawBeforeGridBkg
  503.       .Appearance = sgFlat
  504.       .CellsBorderVisible = False
  505.       
  506.       .Styles("Caption").Font.Size = 14
  507.       .Caption = " "
  508.       .AllowEdit = False
  509.       .GroupByBoxVisible = False
  510.       
  511.       SetPallete
  512.       
  513.       lCaptionHeight = .Height - .ClientHeight
  514.       
  515.       .Width = CELL_WIDTH * 8 + (CELLS_BORDER_WIDTH * 2)
  516.       .Height = CELL_WIDTH * 8 + lCaptionHeight + CELLS_BORDER_WIDTH
  517.    End With
  518. End Property
  519.