How Change Font Size and Color in a TGrid ?!

hi everyone,

i'm a new user of firemonkey and i try to change the font color or size in a TGrid ! it's pretty easy in VCL but i don't find a way to do it in Firemonkey framework !
i already take a look to the component property and also to a way to do it by using a StyleBook (TextCellStyle) but without success !

can you help ?!

thanks
-1
javaid
12/28/2013 12:34:09 PM
embarcadero.delphi.firemonkey 4901 articles. 2 followers. Follow

7 Replies
1392 Views

Similar Articles

[PageSpeed] 49

Have you figured this out?  I have the same requirement.  I would like to change column colors and font sizes in my TGrid.
-1
Eric
1/11/2014 11:49:03 PM
> {quote:title=javaid adnan wrote:}{quote}
> i'm a new user of firemonkey and i try to change the font color or size in a TGrid ! it's pretty easy in VCL but i don't find a way to do it in Firemonkey framework !
> i already take a look to the component property and also to a way to do it by using a StyleBook (TextCellStyle) but without success !


I've just added an article of changing the default grid font to my FireMonkley Guide (see below). There's also article there on 'formatting a column as currency' which explains how to do conditional formatting and will be useful if you want to change select columns or cells.

--
FireMonkey users guide http://bit.ly/10abRZX
MonkeyStyler FireMonkey style designer http://bit.ly/PzxKyI
Embarcadero MVP
-1
Mike
1/12/2014 10:22:45 PM
Thank you Mike for your reply.  Do you know if there is there a way to create and apply styles at runtime?  I need to allow users to pick colors and font sizes at runtime.
1
Eric
1/13/2014 5:45:21 PM
> {quote:title=Eric Hartner wrote:}{quote}
> Thank you Mike for your reply.  Do you know if there is there a way to create and apply styles at runtime?  I need to allow users to pick colors and font sizes at runtime.

You can always set the StyleLookup property, or explicitly set the Font, FontColor and StyledSettings properties. The problem is that cells are 'recycled' as you scroll. You need to keep resetting changes in the SetData method - see the page on creating a currency column. 

If you can't directly determine the settings from the cell data, try passing in multiple values and parsing them out. E.g. pass in 'Cell Text|00FFCCAA' and separate it to get the text and colour.

If that still fails you'll need to add an event to the cell which it can call to get the necessary settings, and set it in the column's CreateCellControl method.

--
FireMonkey users guide http://bit.ly/10abRZX
MonkeyStyler FireMonkey style designer http://bit.ly/PzxKyI
Embarcadero MVP
1
Mike
1/13/2014 10:40:32 PM
Mike - thank you very much!  I was able to get this to work by looking the currency example and overriding the CreateCellControl method.
-1
Eric
1/18/2014 5:54:16 PM
Hi,
I would like to change Font size of a data grid, in the cells and in the titles. Where should i go? In android, the letters are two big in the grid!
I would apreciate if you could help me.
Thanks in advance.


> {quote:title=Mike Sutton wrote:}{quote}
> > {quote:title=javaid adnan wrote:}{quote}
> > i'm a new user of firemonkey and i try to change the font color or size in a TGrid ! it's pretty easy in VCL but i don't find a way to do it in Firemonkey framework !
> > i already take a look to the component property and also to a way to do it by using a StyleBook (TextCellStyle) but without success !
> 
> 
> I've just added an article of changing the default grid font to my FireMonkley Guide (see below). There's also article there on 'formatting a column as currency' which explains how to do conditional formatting and will be useful if you want to change select columns or cells.
> 
> --
> FireMonkey users guide http://bit.ly/10abRZX
> MonkeyStyler FireMonkey style designer http://bit.ly/PzxKyI
> Embarcadero MVP
1
Ana
4/17/2014 2:46:46 PM
> {quote:title=Ana Rodrigues wrote:}{quote}
> Hi,
> I would like to change Font size of a data grid, in the cells and in the titles. Where should i go? In android, the letters are two big in the grid!
> I would apreciate if you could help me.

Did you read the article I referenced?

Once you have that you'll need the post on Chris Rolliston's blog to get hold of the system styles (if you're using the defaults.

(Sorry, I can't provide direct links to either post in the forum).

--
FireMonkey users guide http://bit.ly/10abRZX
MonkeyStyler FireMonkey style designer http://bit.ly/PzxKyI
Embarcadero MVP
-1
Mike
4/18/2014 12:40:57 PM
Reply:

Similar Artilces:

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...

Signature font and color changes to message font and color
My first post. When I compose a message no matter what the signature font and color is set to, it changes to whatever the font and color is of the message. Is there a fix for this? I would ask my job's tech support but I wouldn't trust them to sit the right way on a toilet seat. -- doover ------------------------------------------------------------------------ doover, It appears that in the past few days you have not received a response to your posting. That concerns us, and has triggered this automated reply. Has your problem been resolved? If not, ...

How to change FireMonkey Grid Font Size
*Hi;* I am gokhan from turkey.Because I newly using Rad studio platform , i completely have not adapted. In fact I have studied Delphi Platform (VCL) for 7 years , so I familiar to VCL platform. I working on a project which is simple. I really tried that *change Font Size , Style (etc) of grid , combobox* , but have not coped with it. Well Is there solution without Style Manager?? *Thanks.* Hello, here u find something about change Font, style... http://stackoverflow.com/questions/12454765/how-to-change-font-size-at-stringgrid-in-fm2 Greetings Matthias > {quote:title=g...

Color changes AND font changes...
I would REALLY like to change the fonts for calendars just like I do with BG colors. Can I do it by adding something like font-size: 15pt !important in the calendar ICS file? Thanx, zeddock PS. I notice many patches are referenced here. Why is there not a more regular Sunbird release, nightly or weekly? zeddock wrote: > I would REALLY like to change the fonts for calendars just like I do > with BG colors. Can I do it by adding something like > font-size: 15pt !important > in the calendar ICS file? > > Thanx, > zeddock > > PS. I notice ...

Programatically change the font color of a Label in FireMonkey
Hello. I'd like to know how to change the color and the opacity of a Label in firemonkey. In VCL, I just change this properties of the label and it works normally. Anyway in FireMonkey, it looks like I have to change the custom style. How do I do it programatically? Sorry for the lack of knowledge about it. ^_^ Thanks. > Anyway in FireMonkey, it looks like I have to change the custom style. Not since XE3. > How do I do it programatically? Like this: {code} Label1.StyledSettings := Label1.StyledSettings - [TStyledSetting.ssFontColor]; Label1.FontColor := TAlphaC...

Changing font size of FireMonkey TStringGrid
I have a tStringGrid displayed on sample IOS app using XE4 but cannot find anyway to change the font size which is tiny by default and just about unreadable. Anyone know how this font size, type etc can be set? The tStringGrid control is really unusable unless it can be changed. Thanks > {quote:title=Matthew Shallvey wrote:}{quote} > I have a tStringGrid displayed on sample IOS app using XE4 but cannot find anyway to change the font size which is tiny by default and just about unreadable. Join the queue. My preferred method would be to create a custom style for TTextCell, ...

How to change font size and color of selected linkbutton.
I built a very simple slideshow app in asp.net. I have a list of linkbuttons in a repeater control. When you click one of the links it loads a specific photo in the slideshow.How can I accent or highlight (change the font size and color) the selected linkbutton (link or photonumber).Thank you for any response, it is appreciated!John BrockThis is my current code below:<%@ Page Language="vb" Debug="true" %><script language="vb" runat="server">Dim iPhotoNumber  As IntegerDim iMaxPhotoNumber As IntegerDim sTheSlide     As StringSub Page_Load(ByVal Sender As O...

Changing the font size and color of a Combobox [Edit]
I want to be able to change the font size and font color of a combobox at design time. No matter what I do, nothing works. Is this even possible without writing code? I would really appreciate help with the specific problem, but I'm also open to some good resources for learning to use Firemonkey styles. Thank You Edited by: Joey Hickey on May 6, 2013 12:47 PM Edited by: Joey Hickey on May 6, 2013 12:59 PM > {quote:title=Joey Hickey wrote:}{quote} > I want to be able to change the font size and font color of a combobox at design time. > > No matter what I do...

changing default font size does not affect font size on form buttons and input fields.
Hello, in https://bugzilla.mozilla.org/show_bug.cgi?id=305109 I propose that changing the default font size in Preferences should also change the font sizes for form controls. On windows it works this way. Concerning Unix, though, the form controls keep their size, even if you adjust the default font size in Firefox preferences. This makes for ugly form controls if you do not adjust your GTK settings along with your Firefox default font size. But there is a workaround: you can also make Firefox scale the form controls by applying the following changes to 'font:' li...

DNN2, SolPartMenu change color, font size etc...
I have latest DNN2 installed. I created and installed new skins to the protal with Admin role. Now I am trying to change the font color, backgound color and font size on the SolPartMenu. I tried to make the change in the skin.xml by setting the attribute for the [SolPartMenu] token as: <Objects> <Object> <Token>[SOLPARTMENU]</Token> <Settings> <Setting> <Name>forecolor</Name> <Value>#eeeeee</Value> </Setting> <Setting> ...

Change TGrid font size for Android application purposes
Hi, I have a grid, which is has the appropriate size in win32 target, but when i compile to android platform, the letters are over sized, and i would like to reduce, the font size in the cells and also, in grid titles. Does anyone knows how to do it? Thanks in advance. Best Regards, Ana Rodrigues ...

Changing the font / color / size of the password strength control
I looked at the CSS and tried changing the font of the strength control: weak;ok;good;strong...no good..cant change font or size or color no bold, italic underlined..(but they let you change the position) any suggestions?.. Thanks in advance.. You can update this bug 7802 with these issues.Kirti DeshpandeProgram Manager, Silverlight and ASP.NET AJAXMicrosoftThis posting is provided "AS IS" with no warranties, and confers no rights. Thank you sir. I appreciate your quick response. Any idea when the cleaner implementation it mentions will be?..next release?...is it in...

Links Module: How do you change Font Size / Color / etc.
How do you change Font Size / Color / etc. in the Links module.I'd like the category link to be much larger and a different color than the links underneath it.Thanks. Many of the hyperlinks of the standard DNN modules surround content with the tag <a class="Normal">-doug, Powerhouse Data  kmtharakan wrote:How do you change Font Size / Color / etc. in the Links module.I'd like the category link to be much larger and a different color than the links underneath it.Thanks.You can add html into the Title for the link e.g <h1>My Link</h1>Rob------------------s-...

Globally change font sizes in firemonkey (at run time)
hello How do I change the default settings so I can in/decrease the font size of Tlabel/ buttons etc for all buttons in the app My understanding was to edit the global settings but with code how ? I googled forever but I could be wrong firemonkey is another beast from the VCL users thank you PW > {quote:title=Philippe Watel wrote:}{quote} > hello > How do I change the default settings so I can in/decrease the font size of Tlabel/ buttons etc for all buttons in the app > My understanding was to edit the global settings but with code how ? I googled forever > but I cou...

Web resources about - How Change Font Size and Color in a TGrid ?! - embarcadero.delphi.firemonkey

Change Congress - Wikipedia, the free encyclopedia
Change Congress is an American organization that aims to end perceived corruption in the United States Congress by reducing what it considers ...

Suspecting climate change conspiracy, Judicial Watch sues NOAA for scientists’ e-mails
We’ve been covering the twists and turns of Congressman Lamar Smith’s (R-Tex.) tussle with the National Oceanic and Atmospheric Administration ...

'Change Happens Slowly Until it Happens Quickly': 'BradCast' 12/23/2015
... Dr. James Hansen that the Paris Agreement is a "fraud". "I think we're certainly at an inflection point," says Romm. "You know, change happens ...

Here’s How To Change The Spotify Progress Bar To A Lightsaber
... pretty easy. Just search for the Complete Star Wars Soundtracks playlist. Give it a listen, and the switch will happen automatically. The change ...

San Diego Takes On Climate Change
Joining a short list of metropolitan clean energy leaders facing climate change challenges, the San Diego city council has voted to have 100% ...

The More Things Change, the More we Stay the Same
With all the befits technology affords us, we are increasingly facing a challenge on the human side of the equation the rate of change is outpacing ...

Fueling Up For Change
Sun (ego, identity) left ‘ easy come, easy go’ Sagittarius , and entered enterprising Capricorn yesterday on the Winter Solstice, Monday December ...

The Robot Cars Quietly Get Closer, The Noise They Make Will Change The World
With a reported tie-up between Google's self-driving car efforts and the automaker Ford, the era of autonomous vehicles is getting closer. The ...

Shake Shack's menu change
Shake Shack's menu change

Human Inc. raises $700K to change how we experience sound, use headphones
Joe Dieter and Benjamin Willis want to change the way we listen to audio. The Seattle-based entrepreneurs recently raised $700,000 for their ...

Resources last updated: 12/24/2015 5:40:15 AM