Forum Replies Created
-
AuthorPosts
-
JM-DGParticipant'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);JM-DGParticipant'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! 🙂
JM-DGParticipant'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. 🙂
JM-DGParticipantThank you! Works like a charm. 🙂
JM-DGParticipant'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.
JM-DGParticipant'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.
JM-DGParticipant'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.
JM-DGParticipantI replaced line 988 by
Code:if Assigned(Manager.ShowTimer) = false then
Manager.ShowTimer := TsShowTimer.Create(nil);and everything is working fine now.
JM-DGParticipant'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.
JM-DGParticipant'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… 🙂
JM-DGParticipantYup! Thanks for the quick fix. :a7:
JM-DGParticipantGreat 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;August 16, 2015 at 8:57 pm in reply to: ListView с поддержкой групп; ProgressBar с градиентом #53852JM-DGParticipantI 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);August 15, 2015 at 4:46 pm in reply to: ListView с поддержкой групп; ProgressBar с градиентом #53845JM-DGParticipantThe CreateBmp24 error is quite easy to fix.
Just use the new CreateBmp32 function. 🙂
JM-DGParticipantIf 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;JM-DGParticipantIf you could provide us with a little test application,
I would be pleased to help you out.
February 14, 2012 at 2:57 pm in reply to: ListView с поддержкой групп; ProgressBar с градиентом #47793JM-DGParticipantFound 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);😀
February 13, 2012 at 7:55 pm in reply to: ListView с поддержкой групп; ProgressBar с градиентом #47779JM-DGParticipantOk. 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.
February 3, 2012 at 4:51 pm in reply to: ListView с поддержкой групп; ProgressBar с градиентом #47720JM-DGParticipantFantastic!
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.
JM-DGParticipantHere'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!
-
AuthorPosts