JM-DG

Forum Replies Created

Viewing 20 posts - 41 through 60 (of 73 total)
  • Author
    Posts
  • in reply to: lbOwnerDrawFixed listbox problem #58971
    JM-DG
    Participant
    'Support' wrote:

    Thank you for the demo.

    This issue will be solved in the nearest release, I think.

    sListBox.pas line +/-512 in procedure TsCustomListBox.WMPaint(var Message: TWMPaint)

    After a quick investigation, I think the problem is that a font always gets assigned to the canvas even when there is already one assigned.

    It seems like simply adding this condition does the trick.

    Code:
    if (assigned(Canvas.Font) = false) then
    Canvas.Font.Assign(Font);
    in reply to: Label reflection #58923
    JM-DG
    Participant
    'Support' wrote:

    I will add it in the ToDo list for the TsLabelFX component, but can't tell definitely when it may be implemented.

    Thanks a lot! 🙂

    in reply to: Seeking this kind of component name #58912
    JM-DG
    Participant
    'Support' wrote:

    I think, this is the TsSpeedButton control.

    – Define the ButtonStyle property to bsDropDown

    – Define the DropdownMenu property

    – Define the OnClick event

    Great answer.

    However, I did not want the arrow to trigger a dropdown menu, but instead show a component.

    In the end, I hacked my way around using a TsSpeedButton control for the arrow on the right (showing a component on click) + a glyphed TsBitBtn on the left.

    Thank you. 🙂

    in reply to: Skin Selector manual skinlist reload #58795
    JM-DG
    Participant

    Thank you! Works like a charm. 🙂

    in reply to: Bug in sColorDialog #54758
    JM-DG
    Participant
    'mol' wrote:

    Windows 10, Alpha Controls 10.25:

    Run ASkinDemo.exe, click on 'Additional components' on the frame bar, and select additional controls. Open and close the color picker, then open and close it again. You will get an access violation.

    -Uwe

    I found a fix for this one.

    However, it seems like the fix for TscolorSelect wasn't put in the release yet.

    Re: Установить AlphaControls на C++Builder XE2

    in reply to: TsDateEdit selected date shows white on white #54693
    JM-DG
    Participant
    'rcrandall' wrote:

    Yes, this is version 10.24 of the Alpha Controls package. Delphi version is XE7. I'll do up a little demo of it for you as soon as I can.

    Thanks, Rob C

    What skin do you use? It might be a skin related problem.

    I tried with “Alter Metro”, “Graphite” and “Garnet II” and couldn't reproduce the problem.

    in reply to: AlphaControls и TAdvAlertWindow(TMS Component Pack) #54678
    JM-DG
    Participant
    'Kilya' wrote:

    Please tell me whether it is possible with the help of AlphaControls render TAdvAlertWindow -from TMS Component Pack ??

    If so, how?

    set a property for TAdvAlertWindow in sSkinManager.ThirdPartylist how sPanel — does not offer! Does not work!

    This component seems to have his own built-in skinning engine.

    Maybe you could pull something out by using the custom paint event of TAdvAlertWindow.

    Try getting color informations and graphics from the skinmanager and paint them in the event.

    in reply to: Memory leaks with TsColorSelect and TsAlphaHints. #54622
    JM-DG
    Participant

    I replaced line 988 by

    Code:
    if Assigned(Manager.ShowTimer) = false then
    Manager.ShowTimer := TsShowTimer.Create(nil);

    and everything is working fine now.

    in reply to: Greyed TsColorSelect #54569
    JM-DG
    Participant
    'JM-DG' wrote:

    Why is my TsColorSelect components grayed even though there is an orange ColorValue and grayed option is unchecked(set to false)?

    The color appears only when I mouse over.

    [attachment=7519:TsColorSelect.png]

    Is there a possibility to have the color showed even when normal (NOT moused over)?

    Thank you.

    Ho god… I had DiscoloredGlyph set to true on my SkinManager.

    I feel dumb. <_< Case closed.

    in reply to: Issues with TsColorSelect #54567
    JM-DG
    Participant
    'Outertech' wrote:

    Why is the “New” button disabled in the dialog?

    I do not know the use of the new button…

    'Outertech' wrote:

    Also under “More options” there are 16 additional color slots. How to fill them with own colors?

    – Select your custom color.

    – Click on the slot you want your color to be saved in.

    – Click on the add button bottom right.

    You might want to have a look at one of my question about the TsColorSelect.

    Maybe you can help me out there… 🙂

    Forum post

    in reply to: TsWebBrowser weird bug Delphi7 #53946
    JM-DG
    Participant

    Yup! Thanks for the quick fix. :a7:

    in reply to: TsMeter missing a property? #53945
    JM-DG
    Participant

    Great component indeed. 🙂

    I would like to notify a minor memory leak in the acMeter.pas with the variable ShadowLayer : TBitmap.

    At line 428, there's this code:

    Code:
    ShadowLayer := CreateBmp32(MeterSize.cx, MeterSize.cy);

    I believe, It should be replace with something like:

    Code:
    if ShadowLayer = nil then
    begin
    ShadowLayer := CreateBmp32(MeterSize.cx, MeterSize.cy)
    end else
    begin // Clear canvas
    ShadowLayer.Canvas.Brush.Style := bsClear;
    ShadowLayer.Canvas.Brush.Color := $FFFFFF;
    ShadowLayer.Canvas.FillRect(Rect(0, 0, MeterSize.cx, MeterSize.cy));
    end;

    And add this line

    ShadowLayer.Canvas.Brush.Style := bsSolid;

    in the prepareCache procedure.

    Code:
    // Shadows
    if FPaintData.FDialShadow.Visible then begin
    ShadowLayer.Canvas.Pen.Color := $AAAAAA;
    ShadowLayer.Canvas.Pen.Width := 2;
    ShadowLayer.Canvas.Brush.Style := bsSolid; // Added line <============
    ShadowLayer.Canvas.Brush.Color := $FFFFFF;
    ShadowLayer.Canvas.Ellipse(Margin + ShadowOffset.X, Margin + ShadowOffset.Y,
    MeterSize.cx – Margin -1{+ ShadowOffset.X}, MeterSize.cy – Margin{ + ShadowOffset.Y});
    end;
    JM-DG
    Participant

    I would like to notify you of a memory leak.

    It took me some time to figure this one out… ^_^

    In the procedure TacListItem.Paint(Canvas: TCanvas; BgErase, PaintSelectionFrame: Boolean); the variable ColorMap is never freed.

    After

    Code:
    SetLength(ColorMap^, 0);

    (line 3886)

    Add this line of code :

    Code:
    Dispose(ColorMap);
    JM-DG
    Participant

    The CreateBmp24 error is quite easy to fix.

    Just use the new CreateBmp32 function. 🙂

    in reply to: TsTrackBar Add feature : ShowProgressFrom #53801
    JM-DG
    Participant

    If you want to modify the file yourself, here are the modifications :

    Code:
    private
    FShowProgressFrom: Integer;
    procedure SetShowProgressFrom(Value: Integer);

    published
    property ShowProgressFrom: Integer read FShowProgressFrom write SetShowProgressFrom default 0;

    Add to TsTrackBar.Create

    Code:
    FShowProgressFrom := 0;

    Replace procedure TsTrackBar.PaintBar with

    Code:
    procedure TsTrackBar.PaintBar;
    var
    w, h, i, j, pos: integer;
    aRect, sRect: TRect;
    CI: TCacheInfo;
    begin
    aRect := ChannelRect;
    i := SkinData.SkinManager.GetMaskIndex(TrackBarNdx, s_SliderChannelMask);
    if SkinData.SkinManager.IsValidImgIndex(i) then begin
    CI := MakeCacheInfo(FCommonData.FCacheBmp);
    pos := SendMessage(Handle, TBM_GETPOS, 0, 0);

    case Orientation of
    trHorizontal: begin
    h := HeightOfImage(SkinData.SkinManager.ma) – 1;
    w := HeightOf(aRect);
    aRect.Top := aRect.Top + (w – h) div 2;
    aRect.Bottom := aRect.Top + h;
    InflateRect(aRect, -1, 0);
    DrawSkinRect(FCommonData.FCacheBmp, aRect, CI, SkinData.SkinManager.ma, integer(ControlIsActive(FCommonData)), True);
    if ShowProgress then begin
    sRect := aRect;
    i := Round(WidthOf(aRect) * (pos – Min) / (Max – Min));
    j := Round(WidthOf(aRect) * (ShowProgressFrom – Min) / (Max – Min));
    if reversed then
    begin
    if(pos < ShowProgressFrom)then
    begin
    sRect.Left := sRect.Right – j;
    sRect.Right := sRect.Right – i;
    end else
    begin
    sRect.Left := sRect.Right – i;
    sRect.Right := sRect.Right – j;
    end;
    end else
    begin
    if(pos < ShowProgressFrom)then
    begin
    sRect.Right := sRect.Left + j;
    sRect.Left := sRect.Left + i;
    end else
    begin
    sRect.Right := sRect.Left + i;
    sRect.Left := sRect.Left + j;
    end;
    end;

    PaintProgress(sRect, True);
    end;
    end;

    trVertical: begin
    h := WidthOfImage(SkinData.SkinManager.ma) – 1;
    w := WidthOf(aRect);
    aRect.Left := aRect.Left + (w – h) div 2;
    aRect.Right := aRect.Left + h;
    InflateRect(aRect, 0, -1);
    DrawSkinRect(FCommonData.FCacheBmp, aRect, CI, SkinData.SkinManager.ma, integer(ControlIsActive(FCommonData)), True);
    if ShowProgress then begin
    sRect := aRect;
    i := Round(HeightOf(aRect) * (pos – Min) / (Max – Min));
    j := Round(HeightOf(aRect) * (ShowProgressFrom – Min) / (Max – Min));
    if Reversed then
    begin
    if(pos < ShowProgressFrom)then
    begin
    sRect.Top := sRect.Bottom – j;
    sRect.Bottom := sRect.Bottom – i;
    end else
    begin
    sRect.Top := sRect.Bottom – i;
    sRect.Bottom := sRect.Bottom – j;
    end;
    end else begin
    if(pos < ShowProgressFrom)then
    begin
    sRect.Bottom := sRect.Top + j;
    sRect.Top := sRect.Top + i;
    end else
    begin
    sRect.Bottom := sRect.Top + i;
    sRect.Top := sRect.Top + j;
    end;
    end;

    PaintProgress(sRect, False);
    end;
    end;
    end;
    end;

    if Orientation = trHorizontal then
    PaintTicksHor
    else
    PaintTicksVer;
    end;

    Replace procedure TsTrackBar.StdPaintBar with

    Code:
    procedure TsTrackBar.StdPaintBar(Bmp: TBitmap);
    var
    i, j, pos: integer;
    aRect, sRect: TRect;
    {$IFDEF DELPHI7UP}
    Details: TThemedElementDetails;
    te: TThemedTrackBar;
    {$ENDIF}
    begin
    aRect := ChannelRect;
    {$IFDEF DELPHI7UP}
    if acThemesEnabled then begin
    if Orientation = trVertical then
    te := ttbTrack
    else
    te := ttbTrackVert;

    Details := acThemeServices.GetElementDetails(te);
    acThemeServices.DrawElement(Bmp.Canvas.Handle, Details, aRect);
    InflateRect(aRect, -1, -1);
    end
    else
    {$ENDIF}
    begin
    Frame3D(Bmp.Canvas, aRect, clBtnShadow, clBtnHighlight, 1);
    Frame3D(Bmp.Canvas, aRect, cl3DDkShadow, cl3DLight, 1);
    FillDC(Bmp.Canvas.Handle, aRect, clWindow);
    end;
    if ShowProgress then begin
    sRect := aRect;
    pos := SendMessage(Handle, TBM_GETPOS, 0, 0);
    if Orientation = trVertical then begin
    i := Round(HeightOf(aRect) * (pos – Min) / (Max – Min));
    j := Round(HeightOf(aRect) * (ShowProgressFrom – Min) / (Max – Min));
    if Reversed then
    begin
    if(pos < ShowProgressFrom)then
    begin
    sRect.Top := sRect.Bottom – j;
    sRect.Bottom := sRect.Bottom – i;
    end else
    begin
    sRect.Top := sRect.Bottom – i;
    sRect.Bottom := sRect.Bottom – j;
    end;
    end else begin
    if(pos < ShowProgressFrom)then
    begin
    sRect.Bottom := sRect.Top + j;
    sRect.Top := sRect.Top + i;
    end else
    begin
    sRect.Bottom := sRect.Top + i;
    sRect.Top := sRect.Top + j;
    end;
    end;
    end
    else begin
    i := Round(WidthOf(aRect) * (pos – Min) / (Max – Min));
    j := Round(WidthOf(aRect) * (ShowProgressFrom – Min) / (Max – Min));
    if reversed then
    begin
    if(pos < ShowProgressFrom)then
    begin
    sRect.Left := sRect.Right – j;
    sRect.Right := sRect.Right – i;
    end else
    begin
    sRect.Left := sRect.Right – i;
    sRect.Right := sRect.Right – j;
    end;
    end else
    begin
    if(pos < ShowProgressFrom)then
    begin
    sRect.Right := sRect.Left + j;
    sRect.Left := sRect.Left + i;
    end else
    begin
    sRect.Right := sRect.Left + i;
    sRect.Left := sRect.Left + j;
    end;
    end;
    end;

    FillRect32(Bmp, sRect, ColorToRGB(clHighLight));
    end;
    if Orientation = trHorizontal then
    PaintTicksHor
    else
    PaintTicksVer;
    end;

    Add this procedure

    Code:
    procedure TsTrackBar.SetShowProgressFrom(Value: Integer);
    begin
    if FShowProgressFrom Value then begin
    if Value < Min then Value := Min;
    if Value > Max then Value := Max;
    FShowProgressFrom := Value;
    if not (csLoading in ComponentState) and SkinData.Skinned then
    SkinData.Invalidate
    end;
    end;
    in reply to: Enabling disabled TsFrameBar #47843
    JM-DG
    Participant

    If you could provide us with a little test application,

    I would be pleased to help you out.

    JM-DG
    Participant

    Found a quick fix.

    In procedure TacListItem.CalcBounds (+/- line#2000)

    Replace this line:

    Code:
    FBounds := Rect(Pos.X, Pos.Y, Pos.X + GetWidth, Pos.Y + GetHeight);

    by:

    Code:
    FBounds := Rect(Pos.X, Pos.Y, -Pos.X + GetWidth, Pos.Y + GetHeight);

    😀

    JM-DG
    Participant

    Ok. I plan on releasing a new version of my app before March 1st.

    This new version includes your component.

    So, if you plan on releasing the finalize version in a long time, could you just pm me the fix? 😀

    Thanks a lot.

    JM-DG
    Participant

    Fantastic!

    There is one problem which I can't seem to resolve.

    Having many columns I need to use a horizontal scrollbar.

    However when I drag the scrollbar to the right the items are truncated after a certain distance.

    See picture attached.

    When there is no scrollbar (width of window is large enough) no problem occurs.

    Thanks for any help.

    in reply to: Toggle button #47719
    JM-DG
    Participant

    Here's how I did it. 🙂

    Code:
    var EqIsOn: Boolean;

    procedure TEq.EqOnOffbutClick(Sender: TObject);
    begin
    if EqIsOn=true then
    begin
    EqIsOn:= false;
    EqOnOffbut.Caption := 'Off';
    end
    else
    begin
    EqIsOn:= true;
    EqOnOffbut.Caption := 'On';
    end;
    EqOnOffbut.Down:= EqIsOn;
    end;

    Thanks for the help!

Viewing 20 posts - 41 through 60 (of 73 total)