TsTrackBar causes Exception

Viewing 14 posts - 1 through 14 (of 14 total)
  • Author
    Posts
  • #54099
    Support
    Keymaster

    Hello! Maybe you can give me Dfm-file for the form with this TrackBar? I'll try to repeat the error with this file.

    #54129
    Scurra
    Participant

    Unfortunately, I am not allowed to send you the dfm-file. I am still trying to reproduce the problem by a simple application but so far without success.

    I found out, that in the first line of procedure TsTrackBar.PaintThumb, the rectangle is set to (Left, Top, Right, Bottom) = (0, 0, 1, 1).

    Later, the local procedure ReturnToCache is called and from there the procedure Stretch. Here, the thrid and the fourth parameter are 1 (because of the width/height of the rectangle above). This causes the error in Stretch because in line 5975, ScanLine[1] is called. 1 is the height of the rectangle/bitmap and hence the exception will be raised from the Graphics unit.

    The question is now, why the rectangle has a width/height of only 1. So far, I could not find the reason.

    I will write you, if I have some more information for you.

    (I am using AlphaControls V10.18 and Delphi XE.)

    #54134
    Support
    Keymaster
    Quote:
    The question is now, why the rectangle has a width/height of only 1. So far, I could not find the reason.

    Which skin used?

    #54145
    Scurra
    Participant

    I could still not reproduce the error 🙁 but I simplified the skin as much as possible. The skin-file is attached to this post.

    The behavior using this skin is now even worse: When I resize the form by dragging the form's border, the same exception as reported above is raised. However, applying the procedure written in the first post of this topic for maximizing/de-maximizing the form, the exception occurs only when maximizing the form (not when de-maximizing the form).

    Some additional notes:

    – The exception does not occur anymore when I remove section “FORM”, “BAR” or “PANEL” from the skin.

    – The critical TsTrackbar is placed on some panels, i. e. the structure looks like

    Code:
    sPanel1
    sPanel2

    sPanel9
    sTrackBar1

    where some of the panels use skin-section “BAR” and some of them use skin-section “PANEL”.

    #54160
    Support
    Keymaster

    Thank you, I will check it.

    #54195
    Support
    Keymaster

    This skin have no images, it's mistake?

    #54198
    Scurra
    Participant

    No, its not a mistake. I just simplified the skin as much as possible such that the error still occurs.

    #54200
    Support
    Keymaster

    This TrackBar has horizontal or vertical position?

    #54235
    Scurra
    Participant

    Its position is horizontal.

    #54269
    Support
    Keymaster

    I can't reproduce it, unfortunately. Maybe you has a some demo-application already?

    #54275
    Scurra
    Participant

    Ok, no problem. I can't reproduce it neither. If I get additional information or a demo-application, I will contact you again.

    #54296
    Scurra
    Participant

    Ok, now I have good and bad news:

    I integrated AlphaControls 10.20 which fixed the bug with the TsTrackbar. Now, however, I have display-bugs with some panels.

    The properties in the dfm-file of one of these panels looks as follows:

    Code:
    object pnlTest: TsPanel
    Left = 758
    Top = 0
    Width = 26
    Height = 132
    Margins.Left = 0
    Margins.Top = 0
    Margins.Right = 0
    Margins.Bottom = 0
    Align = alRight
    BevelEdges = []
    BevelOuter = bvNone
    Padding.Left = 7
    Padding.Top = 2
    Padding.Bottom = 2
    TabOrder = 2
    SkinData.SkinSection = 'BAR'

    The skin 'BAR' in Options.dat looks as follows:

    [BAR]

    GRADIENTPERCENT=0

    OUTERMODE=1

    Am I doing something wrong? I tried to fix the problem by using TsPanel.Invalidate, .Repaint, .Refresh and .Update at the end of the FormResize-procedure.

    When I can reproduce the error, I will upload a demo-project.

    #54327
    Support
    Keymaster

    Wait and try the v10.21, some changes were added there.

    I hope, the problem is gone there.

    #54349
    Scurra
    Participant

    Thank you, the problem is solved now 🙂

Viewing 14 posts - 1 through 14 (of 14 total)
  • You must be logged in to reply to this topic.