×

Discussion Board

Results 1 to 9 of 9
  1. #1
    Regular Contributor
    Join Date
    Aug 2006
    Location
    Bangalore
    Posts
    200

    Smile How to adjust Font in Gridview?

    Hi All,

    As per basics font are adjusted by fontbitmap server.I want to change my font such as it won't overlap to grid boundry.Presently it is overlapping ! I tried so many thing but not able to find out fesible solution.

    Thanks ,
    Thanks & Regards,

    Chirag

  2. #2
    Regular Contributor
    Join Date
    Jan 2005
    Location
    Estonia
    Posts
    350

    Re: How to adjust Font in Gridview?

    Code:
    // ---------------------------------------------------------
    // CGridContainer::SizeChanged()
    // Called by framework when the view size is changed
    void CGridContainer::SizeChanged()
    {
    CGraphicsDevice* screenDevice = iCoeEnv->ScreenDevice();
    TFontSpec fontSpec2 = CCoeEnv::Static()->NormalFont()->FontSpecInTwips();
    fontSpec2.iTypeface.iName=_L("Latin");
    fontSpec2.iHeight = 50;
    CFont* fontText; 
    screenDevice->GetNearestFontInTwips(fontText,fontSpec2);
    iGrid->ItemDrawer()->FormattedCellData()->SetSubCellFontL(1,fontText);
    CCoeEnv::Static()->ReleaseScreenFont(fontText);
    ...
    }
    You can check also SetSubCellSizeL,SubCellPosition and SubCellBaselinePos

  3. #3
    Regular Contributor
    Join Date
    Aug 2006
    Location
    Bangalore
    Posts
    200

    Thumbs up Re: How to adjust Font in Gridview?

    Thanks for your kind reply.
    Thanks & Regards,

    Chirag

  4. #4
    Regular Contributor
    Join Date
    May 2007
    Posts
    114

    Re: How to adjust Font in Gridview?

    Quote Originally Posted by chirag_cel View Post
    Hi All,

    As per basics font are adjusted by fontbitmap server.I want to change my font such as it won't overlap to grid boundry.Presently it is overlapping ! I tried so many thing but not able to find out fesible solution.

    Thanks ,
    Hi chirag and rihoe

    can u tell me how to change the text colour and background colour for a specific cell.I men i m having a grid with 3 row n 3 coloumn and i want to set text colour for first cell black and background is red.is it possible if it is plz guide me how can i do this.

    Thanks
    Mobile_Don

  5. #5
    Regular Contributor
    Join Date
    Jan 2005
    Location
    Estonia
    Posts
    350

    Re: How to adjust Font in Gridview?

    AFAIK, you can't do it cell-by-cell basis. You can set to have different colors for active cell.
    "I only know that I know nothing." (Socrates)

  6. #6
    Regular Contributor
    Join Date
    May 2007
    Posts
    114

    Re: How to adjust Font in Gridview?

    Quote Originally Posted by rihoe View Post
    AFAIK, you can't do it cell-by-cell basis. You can set to have different colors for active cell.
    Hi
    thanx for help sir
    actually im having 3*3 grid.it means i m having item0 to item8 in my cell if oi m not wrong.coz there is 3 column and 3 row.so every row has 3 items.if i need to set text colour for first item of first row and second item of third row.then how can i do that.
    i m little bit confused with "active cell".is it selected item or that grid view which is showing on my container.
    here i m really confused with subcell number.when i m trying to set colour for a subcell using this
    iGrid->ItemDrawer()->ColumnData()->SetSubCellColorsL(1,gridColors); //it works for whole grid
    but if i go to for change the second item colour using this
    iGrid->ItemDrawer()->ColumnData()->SetSubCellColorsL(2,gridColors);
    its not work here what i have found that my cell number is 1 not 2.then what will be the number of second item in first row.
    sorry for write long text but i m really confused with grid.
    plz help me

    Mobile_Don

  7. #7
    Regular Contributor
    Join Date
    Jan 2005
    Location
    Estonia
    Posts
    350

    Re: How to adjust Font in Gridview?

    Grid is just wide listbox.
    In Grid you have cells (3x3 in your case). Each cell can contain subcells (if you have icon and text then it is 2 subcells in 1 cell)
    You can give different colors to different subcells , but these work for all cells.
    Active cell is the one that has focus (it is selected item) - if you move your cursor around then focus changes.
    "I only know that I know nothing." (Socrates)

  8. #8
    Regular Contributor
    Join Date
    May 2007
    Posts
    114

    Re: How to adjust Font in Gridview?

    Quote Originally Posted by rihoe View Post
    Grid is just wide listbox.
    In Grid you have cells (3x3 in your case). Each cell can contain subcells (if you have icon and text then it is 2 subcells in 1 cell)
    You can give different colors to different subcells , but these work for all cells.
    Active cell is the one that has focus (it is selected item) - if you move your cursor around then focus changes.
    Thanx sir i got it.and i have changed font style for different subcells.so i ll manage with it.and it works for particuler subcell not for all thats y i m looking similer things for background colour or text colour.
    one more question is that actually i m working to make a calendar app look like nokia i have read lots of post regarding with it.there is a class CAknCaleMonthStyleGrid but i did not use it and did not get any clue to use it.so after this i came on selection grid so i designed 8*7 grid view.but its not working like calendar.
    can u give me some guide line for making similer calendar.
    any help plz

    Mobile_Don

  9. #9
    Regular Contributor
    Join Date
    May 2007
    Posts
    114

    Re: How to adjust Font in Gridview?

    Quote Originally Posted by rihoe View Post
    Grid is just wide listbox.
    In Grid you have cells (3x3 in your case). Each cell can contain subcells (if you have icon and text then it is 2 subcells in 1 cell)
    You can give different colors to different subcells , but these work for all cells.
    Active cell is the one that has focus (it is selected item) - if you move your cursor around then focus changes.
    Hi

    Can i make a grid transparent.i mean is it possible that a grid can build default background rather than its own background.coz i want to draw somthing on container but whenever i try this it is overlaping by grid background.
    i found a method SetDrawBackground() but its not working for me.is this function can solve my problem.
    plz just give me a hint.

    Thanks in Advance
    Mobile_Don

Similar Threads

  1. How to get the name of the used font
    By chrishawaii in forum Symbian User Interface
    Replies: 1
    Last Post: 2007-06-22, 06:55
  2. [announce] full screen dot amtrix scroller
    By xchip in forum Symbian
    Replies: 7
    Last Post: 2006-06-08, 22:17
  3. New font 6600
    By hamishw in forum Symbian
    Replies: 0
    Last Post: 2005-04-10, 10:59
  4. Replies: 1
    Last Post: 1970-01-01, 02:00

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
×