Forum Replies Created
-
AuthorPosts
-
July 17, 2023 at 3:23 pm in reply to: Is there a way to get custom mouse cursors to work with AC? #71280kevinParticipant
Does it work when the skinmanager is disabled?
I have used custom cursors before, with AC.
- This reply was modified 1 year, 4 months ago by kevin.
kevinParticipantI ended up solving my scaling issues, which were complex.
The problem isn’t with Alpha controls / skin manager.
With XE3 I have to manually include a manifest file which specifies DPI-Aware. This takes care of the hint scaling.
The other scaling issues were caused by other issues.
For reference, in case others have issues with font size, always check that the form scaiing is set to false, and also check the forms “ParentFont” setting, and whether there are any other manual font size settings in the code.
kevinParticipantUpdate: setting sAlphaHints1.UseSkinData to true will display the modified color, but only the first time the hint is shown. Thereafter the hint is completely transparent, with no visible text.
kevinParticipantSadly, this doesn’t work when I tried it. This is the code I used to test it:
unit Unit1; interface uses Winapi.Windows, Winapi.Messages, System.SysUtils, System.Variants, System.Classes, Vcl.Graphics, Vcl.Controls, Vcl.Forms, Vcl.Dialogs, Vcl.StdCtrls, acAlphaHints, sSkinManager; type TForm1 = class(TForm) Button1: TButton; sSkinManager1: TsSkinManager; sAlphaHints1: TsAlphaHints; procedure sSkinManager1Activate(Sender: TObject); procedure sSkinManager1AfterChange(Sender: TObject); private { Private declarations } procedure SetHintColor(HintColor : TColor); public { Public declarations } end; var Form1: TForm1; implementation {$R *.dfm} uses sStyleSimply; const // NewHintColor = clWhite; NewHintColor = clGreen; procedure TForm1.SetHintColor(HintColor : TColor); begin if sSkinManager1.SkinCommonInfo.Sections[ssHint] >= 0 then with sSkinManager1.gd[sSkinManager1.SkinCommonInfo.Sections[ssHint]] do begin BorderIndex := -1; // Do not use predefined image if exists BorderWidth := 1; BorderRadius := 2; Props[0].Color := HintColor; Props[0].BorderColor := clBlue; Props[0].FontColor.Color := clRed; end; end; procedure TForm1.sSkinManager1Activate(Sender: TObject); begin SetHintColor(NewHintColor); end; procedure TForm1.sSkinManager1AfterChange(Sender: TObject); begin SetHintColor(NewHintColor); end; end.
kevinParticipantIs there a way to change the background color of alphahints to white – or whatever color the system is using – rather than yellow?
kevinParticipant> XE3 have not good support of scaling
Yes, however I’m loathe to spend several thousand dollars on the latest version of Delphi.
For non-alphacontrols apps, the DPI-aware manifest option works fine for scaling. One simply sets form scaling to true, and be sure to use truetype fonts. Some manual adjustments still need to be made to listbox itemheights and grid rowheights.
But alphacontrols works fine too, using sAlphahints rather than native hints.
kevinParticipantI’m using XE3.
kevinParticipantP.S. Using sAlphahints, rather than native hints, fixes the hint size issue. So best not to use the manifest.
kevinParticipantYou can forbid skinning of any control if add ‘256’ to the Tag property.
Thanks, that did the trick. I saw that information somewhere, but I wasn’t thinking of a form as being a control.
kevinParticipant'Support' wrote:Hello
You should be sure that files from old version of AlphaControls are not exists on your PC.
If you want I can connect to this PC and solve an issue remotely.
I ended up directly adding Embarcadero's pngimage unit to the project, which fixed it.
As a matter of interest, do you know a way of finding out the location of a unit that Delphi finds when it is compiling? That way I can remove the offending unit.
-
AuthorPosts