Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > ActiveX COM > Report Control
  New Posts New Posts RSS Feed - Icon (or item) padding/margins
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Icon (or item) padding/margins

 Post Reply Post Reply
Author
Message
ElvisM View Drop Down
Senior Member
Senior Member
Avatar

Joined: 12 October 2006
Location: Venezuela
Status: Offline
Points: 129
Post Options Post Options   Thanks (0) Thanks(0)   Quote ElvisM Quote  Post ReplyReply Direct Link To This Post Topic: Icon (or item) padding/margins
    Posted: 13 July 2016 at 7:17pm
Dear all.
I have a reportcontrol which is showing a customer list, but, the icon (left alignment) is nor correctly shown (see image). Is there any way to assign padding or margins for icon (or item) ? 

I tryes with all the alignment values, but, no one works for me.



If you align the icon at right, it is shown perfectly.



Best regards,








Product: Xtreme SuitePro (ActiveX) version 17.2
Platform: Windows 10 64bits
Language: Visual Basic 2015
Back to Top
olebed View Drop Down
Admin Group
Admin Group


Joined: 01 July 2014
Location: Ukraine
Status: Offline
Points: 841
Post Options Post Options   Thanks (0) Thanks(0)   Quote olebed Quote  Post ReplyReply Direct Link To This Post Posted: 14 July 2016 at 4:52am
Hello ElvisM,

Please write code which you use to create and manage these controls.

Regards,
 Oleksandr Lebed
Back to Top
ElvisM View Drop Down
Senior Member
Senior Member
Avatar

Joined: 12 October 2006
Location: Venezuela
Status: Offline
Points: 129
Post Options Post Options   Thanks (0) Thanks(0)   Quote ElvisM Quote  Post ReplyReply Direct Link To This Post Posted: 14 July 2016 at 12:02pm
Thanks Olebed.
I placed a  ReportControl on the form, this is the code.

To load the control:

AxReportControl5.PaintManager.ColumnStyle = XtremeReportControl.XTPReportColumnStyle.xtpColumnResource
        AxReportControl5.EnableMarkup = True
        AxReportControl5.PaintManager.ForceDynamicMarkupForCell = True
        AxReportControl5.SetCustomDraw(XtremeReportControl.XTPReportCustomDraw.xtpCustomBeforeDrawRow)
        AxReportControl5.PaintManager.TextFont.Name = Me.Font.Name
        AxReportControl5.PaintManager.TextFont.Size = Me.Font.Size
        AxReportControl5.PaintManager.PreviewTextFont.Name = Me.Font.Name
        AxReportControl5.PaintManager.PreviewTextFont.Size = Me.Font.Size
        AxReportControl5.PaintManager.HorizontalGridStyle = XtremeReportControl.XTPReportGridStyle.xtpGridNoLines
        AxReportControl5.PaintManager.VerticalGridStyle = XtremeReportControl.XTPReportGridStyle.xtpGridNoLines
        AxReportControl5.Icons = frmMENU.AxImageManager2.Icons
        AxReportControl5.Columns.Add(0, ":Reg", -1, False)
        AxReportControl5.Columns.Add(1, ":ID", -1, False)
        AxReportControl5.Columns.Add(2, ":Referencia", -1, False)
        AxReportControl5.Columns.Add(3, ":Nombre", 100, True)
        AxReportControl5.Columns.Add(4, ":RIF", 30, True)
        AxReportControl5.Columns(0).Tag = "reg"
        AxReportControl5.Columns(1).Tag = "id"
        AxReportControl5.Columns(2).Tag = "referencia"
        AxReportControl5.Columns(3).Tag = "nombre"
        AxReportControl5.Columns(4).Tag = "cedula"
        AxReportControl5.PaintManager.NoItemsText = ":No hay registros que coumplan con el criterio de búsqueda"
        AxReportControl5.PaintManager.FooterRowsDividerStyle = XtremeReportControl.XTPReportFixedRowsDividerStyle.xtpReportFixedRowsDividerShade
        AxReportControl5.PaintManager.HeaderRowsDividerStyle = XtremeReportControl.XTPReportFixedRowsDividerStyle.xtpReportFixedRowsDividerShade
        AxReportControl5.PaintManager.CaptionFont.Name = Me.Font.Name
        AxReportControl5.PaintManager.CaptionFont.Size = Me.Font.Size
        AxReportControl5.PaintManager.CaptionFont.Bold = True
        AxReportControl5.PaintManager.UseAlternativeBackground = True
        AxReportControl5.PaintManager.AlternativeBackgroundColor = RGB(176, 224, 230)
        AxReportControl5.Columns(0).HeaderAlignment = XtremeReportControl.XTPColumnAlignment.xtpAlignmentRight
        AxReportControl5.Columns(0).Alignment = XtremeReportControl.XTPColumnAlignment.xtpAlignmentRight
        AxReportControl5.Columns(3).Alignment = XtremeReportControl.XTPColumnAlignment.xtpAlignmentIconVCenter + XtremeRe portControl.XTPColumnAlignment.xtpAlignmentIconLeft
        AxReportControl5.ShowHeader = False

Then, I populate the reportcontrol: 

Dim MiItem As XtremeReportControl.ReportRecord
Dim Regs As Integer

Dim ConsultaGEN2 As New OdbcCommand("call rec_cliente_05('" & TextBox2.Text & "', 'A');", MiConexion)
Dim MisDatos2 As OdbcDataReader

                    MisDatos2 = ConsultaGEN2.ExecuteReader
                    If MisDatos2.HasRows Then
                        Regs = 0
                        AxReportControl5.Records.DeleteAll()
                        Do While MisDatos2.Read
                            Regs = Regs + 1
                            MiItem = AxReportControl5.Records.Add()
                            MiItem.AddItem(Regs)
                            MiItem.AddItem("")
                            MiItem.AddItem("")
                            MiItem.AddItem("")
                            MiItem.AddItem("")
                            MiItem.Item(1).Value = MisDatos2.GetInt32(0)
                            MiItem.Item(2).Value = RNulo(MisDatos2.Item(1))
                            MiItem.Item(3).Value = RNulo(MisDatos2.Item(2))
                            MiItem.Item(4).Value = RNulo(MisDatos2.Item(3))
                            MiItem.Item(3).Icon = 160010
                        Loop
                        AxReportControl5.Populate()
                        If AxReportControl5.Rows.Count < 9 Then
                            AxReportControl5.Height = AxReportControl5.Rows.Count * 20.5
                        Else
                            AxReportControl5.Height = 9 * 19.5
                        End If
                    
Product: Xtreme SuitePro (ActiveX) version 17.2
Platform: Windows 10 64bits
Language: Visual Basic 2015
Back to Top
olebed View Drop Down
Admin Group
Admin Group


Joined: 01 July 2014
Location: Ukraine
Status: Offline
Points: 841
Post Options Post Options   Thanks (0) Thanks(0)   Quote olebed Quote  Post ReplyReply Direct Link To This Post Posted: 15 July 2016 at 11:33am
In code you describe ReportControl with 5 columns, but on image I can see only one cell "FERREINDUSTRIAL DANIEL C.A.". Or this is not ReportControl ?   Are images in the first message responsible for code ?

I have checked icons in ReportControl, they work correctly in VB samples VirtualList and ReportSample.
Back to Top
ElvisM View Drop Down
Senior Member
Senior Member
Avatar

Joined: 12 October 2006
Location: Venezuela
Status: Offline
Points: 129
Post Options Post Options   Thanks (0) Thanks(0)   Quote ElvisM Quote  Post ReplyReply Direct Link To This Post Posted: 15 July 2016 at 2:42pm
Helo Olebed.
Yes this code generate the first image.
Even I have 5 columns I am showing one only colum (the another columns have internal information which is not useful for user, only for program).

is it possible pad the image into reportcontrol?

Best regards,
Product: Xtreme SuitePro (ActiveX) version 17.2
Platform: Windows 10 64bits
Language: Visual Basic 2015
Back to Top
olebed View Drop Down
Admin Group
Admin Group


Joined: 01 July 2014
Location: Ukraine
Status: Offline
Points: 841
Post Options Post Options   Thanks (0) Thanks(0)   Quote olebed Quote  Post ReplyReply Direct Link To This Post Posted: 15 July 2016 at 3:33pm
You can use XAML to set text margins.

Default RecordItems don't support showing images except icons. You can also try to use XAML for showing images.
Back to Top
ElvisM View Drop Down
Senior Member
Senior Member
Avatar

Joined: 12 October 2006
Location: Venezuela
Status: Offline
Points: 129
Post Options Post Options   Thanks (0) Thanks(0)   Quote ElvisM Quote  Post ReplyReply Direct Link To This Post Posted: 16 July 2016 at 6:36pm
Thanks. but issue with Markup is that it does not support accents i.e. Á, á, é, É, Ñ, ñ, etc. 

I tryed with escape words as &Aacute; &Eacute; and others and they dont work


Product: Xtreme SuitePro (ActiveX) version 17.2
Platform: Windows 10 64bits
Language: Visual Basic 2015
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.156 seconds.