How to set font size and font style for a THotkey control?

Now I add a Thotkey control on a form.Yes.It is a very useful control to handle hotkey.
But how I can set a bigger font and bold style for it.

Regards.
Jack Xiao
0
bing
12/21/2009 2:26:48 AM
embarcadero.delphi.win32 2183 articles. 0 followers. Follow

3 Replies
659 Views

Similar Articles

[PageSpeed] 23

> {quote:title=bing xiao wrote:}{quote}
> Now I add a Thotkey control on a form.Yes.It is a very useful control to handle hotkey.
> But how I can set a bigger font and bold style for it.

The THotkey is simply a wrapper around the Windows HOTKEY control. It gets it's font size and style from the user's display settings, using one of the system values (see ComCtrls.pas, procedure TCustomHotKey.AdjustHeight for an indication). IOW, you shouldn't try to change it, as it's a system-wide setting that the user has configured.
0
Ken
12/21/2009 4:41:37 PM
bing xiao wrote :
> Now I add a Thotkey control on a form.Yes.It is a very useful control to handle 
> hotkey. But how I can set a bigger font and bold style for it.

THotKey does not publish the protected 'font' property it inherits from 
'TControl' but you can access it utilizing a kind of a hack. Find a more thorough 
explanation here:
http://delphi.about.com/od/oopindelphi/l/aa082603a.htm

{code}
type
  TAccessHotkey = class(THotKey);

procedure TForm1.FormCreate(Sender: TObject);
begin
  TAccessHotkey(HotKey1).Font.Size := 20;
  TAccessHotkey(HotKey1).Font.Style := [fsBold];
  if HotKey1.AutoSize then begin
    HotKey1.AutoSize := False;
    HotKey1.AutoSize := True;
  end;
end;
{code}


Regards.
0
Sertac
12/22/2009 10:24:43 PM
Sertac Akyuz wrote :

> THotKey does not publish the protected 'font' property it inherits from 
> 'TControl' [...]

Coming to think of it, since the control also inherits the 'ParentFont' property 
which is True by default, an alternative would be to modify the parenting 
control's font. İ.e. the form which the HotKey is on.
0
Sertac
12/23/2009 12:43:07 AM
Reply:

Similar Artilces:

Controlling fonts and font sizes in a menu control
Am building a menu programically (fragment below):Dim mnuTopics As New MenuItem("Lessons") For i As Integer = 1 To 10    Dim menuLesson As New MenuItem("Subject" & i, Nothing, Nothing, "~/Main.aspx?page=Subject&ID=" & i)    mnuTopics.ChildItems.Add(menuLesson)Next MainMenu.Items.Add(mnuTopics) Dim menuProfile As New MenuItem("Profile", Nothing, Nothing, "~/Main.aspx?action=profile")MainMenu.Items.Add(menuProfile)am unable to programically change menu font sizes. Don't want to access a theme/skin--just want to programmically change the font size ba...

font!font!font!
Name: robbie Product: Firefox Summary: font!font!font! Comments: Firefox font is bad !Very bad! The only reason I don't want to use firefox is font problem . I know how to change the font on firefox but it just not good enough. Internet explorer font is excellent.It also the only thing better than firefox. Browser Details: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; Foxy/1; .NET CLR 1.1.4322) ...

Fonts & Fonts Size Settings
What Control the Fonts & Fonts Size Settings you see at the browser? I have deployed an application and found it is not WYSWYG for some PCs. The alignment of the GUI is completely off. This is strange that when my browser is connect to my development PC (XP), the alignment is fine. But when the same program is deployed at the App Server (Win2k3), the alignment is completely off. I didn't change my browser settings in between. Thanks in advance, SAM ...

How to change tree view's (web control) back color, font color and font size using CSS (Cascading Style Shteets)
Hi All, I have created tree view (web control) but i want to change all the properties of it, through single style sheet. Like all other controls (label, text box and combo box) it's not possible to change all the properties of treeview through single style sheet by including it to the contol ???? Please help........ MAITRAY. Sorry. No external css. but these attributes: DefaultStyle="background:#CCCCCC;border:solid 1px;color:black;font-size:8pt" HoverStyle="color:blue;font-name:Arial" SelectedStyle="c...

How to set the default font size, font face in RTE?
Subject tells the question. Thanks for any help! http:/www.teamsybase.com/bruce.armstrong/rte_font.zip On Sun, 12 Nov 2000 13:02:14 +1100, in powersoft.public.powerbuilder.powerscript John Smith <johnjnrsmith@hotmail.com> wrote: >Subject tells the question. > >Thanks for any help! > > Bruce Armstrong [TeamSybase] mailto:Bruce.Armstrong@teamsybase.com Preach the gospel at all times. If necessary, use words. [Francis of Assisi] http://www.kidbrothers.org | http://www.fccwc.org http://www.harvest.org/knowgod/index.htm | http://www...

Font font = new Font
i am not sure if when i use   Font font = new Font("Free 3 of 9", 16); // Free 3 of 9 is a bar code Font   in my code if the end user does not have that font will it still reder corecly if i use it on a dinamicly generated grephic you know the code will allways work I supose you're trying to create an image with a barcode to print it and then read the barcode. Read this article. If your ASP.NET server has the font installed and you create an Image using that font, the client machine doesn't have to install it. I tried that some time ago, but the barcode...

Can user control asp:TextBox font size by using browser text size setting
Virtually all elements on my web-pages font-size can be controlled by the user changing the text-size on the browser.   This does not work with the textbox control.  Is there something I am missing or does the presentation of font-size have to be controlled by CSS class through the use of themes.  I would rather not have to explain to the web user that they need to go to another page and choose a special theme to accomodate their text size choice. You can check the browser resolution on page preInit and then set a specific theme for your textboxes if you would...

Calendar Control Style and Font Size
The Calendar control has a CssClass property that I assume you can set the font-size, colors, etc.  I'd like to simply change the font-size of the days, month, year, etc and event the arrows.I'm trying to make the calendar control more usable for a touch screen.  Has anyone been able to change the style of the calendar successfully?Thanks,Rob ...

How to set font size in a Label control
I'm trying to specify a font size in a Label control, but the code I thought would work is giving me an error... "Cannot implicitly convert type 'System.Web.UI.WebControls.FontSize' to 'System.Web.UI.WebControls.FontUnit'".  The code causing the error:Label lbl = new Label(); lbl.Visible = true; lbl.Font.Size = FontSize.Small; lbl.Text = (string)schedule[e.Day.Date.ToShortDateString()]; e.Cell.Controls.Add(lbl);So the question is how do I need to encode a font size change?"Here's where the fun begins." -- Han Solo  Try the below ins...

superreview granted: [Bug 230173] Mozilla use 15 point size font for characters with style {font-size:14px;} : [Attachment 138463] use float type for mPointSize
Christopher Blizzard <blizzard@mozilla.org> has granted Christopher Blizzard <blizzard@mozilla.org>'s request for superreview: Bug 230173: Mozilla use 15 point size font for characters with style {font-size:14px;} http://bugzilla.mozilla.org/show_bug.cgi?id=230173 Attachment 138463: use float type for mPointSize http://bugzilla.mozilla.org/attachment.cgi?id=138463&action=edit ...

how to add a style like font size, font color to page.title
Hey Hi, i am setting up my page title in the code behind using page.title. works perfectly, but i was just wondering is it possible to change the font size and color etc of the text being displayed in the page titles. i would like to do this in code behind also. any suggestions are highly appreciated . Thanks  a bunchKeyboard not found. Please Press < F1 > to RESUMEPlease Remember to Mark as Answer for the post(s) that help you.....so it can help others......Thanks the Page.Title is the browser header bar... you can't set the fonts or colors for this.. this is a client ...

how to set font style for a textbox in a composite control??!?
i have a composite control that has 3 controls: - textbox - required validator - enhanced validator (custom control) i need to set font properties for all 3 controls...and disable view property for the composite control i tried to do something like this (for the textbox font): Public ReadOnly Property BoxFont() As FontInfo Get Return mybox.Font End Get End Property the property is shown in the property window...it works fine in the design view...but when I build my project then everything sets on default again..... i think i am missin some...

How to set font type and size in rtf control
Can i set the font type and size in rich text edit control programmaticaly. I mean not through the toolbar... Is there any function or some way to do it Take a look at Bruce Armstrong's example at http://www.teamsybase.com/bruce.armstrong/downloads.xml Daniel. <Naveed Chaudhry> wrote in message news:408f632a.4bf0.1681692777@sybase.com... > Can i set the font type and size in rich text edit control > programmaticaly. I mean not through the toolbar... > Is there any function or some way to do it ...

How to programatically set the Style / Font for a web control
HiAny quick guide showing how to programatically set Font / Style properties of a web control, in particular HyperLinkregards Hi,do it like this in the eventhandler of your choice:HyperLink1.CssClass = "myClass"where you define in your .css file the class:.myClass { color:#f00; }Try to define everything that has to do with making up the style of a page with css so you can switch quite easily in a later stadium of your development.Grz, Kris.Read my blog. Handy Firefox plugins for web developers.Workaround for non working Mark as answer buttons....

Web resources about - How to set font size and font style for a THotkey control? - embarcadero.delphi.win32

Control - Wikipedia, the free encyclopedia
Text is available under the Creative Commons Attribution-ShareAlike License ;additional terms may apply. By using this site, you agree to the ...

Grassfire near Leneva in Victoria's north-east now under control, fire authorities say
A grassfire burning near Leneva in Victoria's north-east is now under control, fire authorities say.

Publicis Said to Weigh Bid for Control of Cheil Worldwide
Publicis Groupe is weighing a bid for a controlling stake in Cheil Worldwide, people with knowledge of the matter said. The French company is ...

Oregon Pharmacists May Prescribe Birth Control - Al Jazeera America
Oregon is the only state to allow pharmacists to prescribe hormonal patches and the pill; California will soon follow

Playing around with BMW’s 7 Series gesture control user interface
We take a BMW 7 Series for a short drive to play with its gesture control. Video shot/edited by Jennifer Hahn. (video link) LAS VEGAS—Yesterday, ...

I've heard a rumor from Ground Control/Oh no, don't say it's true....
"David Bowie, the infinitely changeable, fiercely forward-looking songwriter... died on Sunday, two days after his 69th birthday...."

This IBM programmer can control a BB-8 droid from 'Star Wars' with his mind
... decided to take Sphero's excellent "Star Wars: The Force Awakens" BB-8 app-powered droid and take it a step further with the ability to control ...

Want to Stay Comfortable? Ask Government to Mandate Temperature Controls on Thermometers
... ” should be considered for summer months, e.g. a maximum allowable temperature reading of 85 degrees Fahrenheit on all thermostats to control ...

Will gun control sink gun stocks?
Could new gun control measures hurt gun stocks? Boris Schlossberg of BK Asset Management and Gina Sanchez of Chantico Global discuss with Brian ...

Pro-gun control Brady Campaign to endorse Clinton - CNNPolitics.com
The Brady Campaign to Prevent Gun Violence will endorse Hillary Clinton for president Tuesday in Iowa, the former secretary of state's campaign ...

Resources last updated: 1/13/2016 4:41:20 PM