markdown 修改了重点行的DevExpress红色边框

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了markdown 修改了重点行的DevExpress红色边框相关的知识,希望对你有一定的参考价值。

Red Border on Focused Row

This is a better version of putting a red border on a focused row. Should work with DevExpress grid and treelist. Just add this code to the control's CustomDrawNodeCell event handler.

    Private Sub tlSetupMenu_CustomDrawNodeCell(sender As Object, e As CustomDrawNodeCellEventArgs) Handles tlSetupMenu.CustomDrawNodeCell
        Dim tree As TreeList
        Dim graphic As Graphics = e.Graphics
        Dim rectangle As Rectangle = e.Bounds
        Dim brush As Drawing.SolidBrush = Nothing
        Dim borderWidth As Single = 2
    
        Try
            If tlSetupMenu.FocusedNode IsNot Nothing Then
                If tlSetupMenu.FocusedNode.Equals(e.Node) Then
                    tree = TryCast(sender, TreeList)
    
                    tree.Painter.DefaultPaintHelper.DrawNodeCell(e)
                    brush = New Drawing.SolidBrush(Color.Red)
    
                    If e.Column.VisibleIndex = 0 Then
                        graphic.FillRectangle(brush, New Rectangle(rectangle.X, rectangle.Y, borderWidth, rectangle.Height))
                    End If
                    If e.Column.VisibleIndex = tree.VisibleColumns.Count - 1 Then
                        graphic.FillRectangle(brush, New Rectangle(rectangle.Right - borderWidth, rectangle.Y, borderWidth, rectangle.Height))
                    End If  
    
                    graphic.FillRectangle(brush, New Rectangle(rectangle.X, rectangle.Y, rectangle.Width + 1, borderWidth))
                    graphic.FillRectangle(brush, New Rectangle(rectangle.X, rectangle.Bottom - borderWidth, rectangle.Width + 1, borderWidth))
    
                    e.Handled = True
                End If
            End If
        Catch ex As Exception
            Throw
        Finally
            DHO.ReleaseUnmanagedResource(brush)
        End Try
    End Sub


    

以上是关于markdown 修改了重点行的DevExpress红色边框的主要内容,如果未能解决你的问题,请参考以下文章

vscode 编辑markdown文件

markdown 重点

DaoQMan 快速 MarkDown 规范

markdown 修改了django-plotly-dash的设置

Markdown修改字体颜色

vscode Markdown预览模式代码块注释字体修改