SPONSORS:






User Tag List

Thanks Thanks:  0
Likes Likes:  0
Dislikes Dislikes:  0
Results 1 to 5 of 5
  1. #1
    Junior Member
    Join Date
    Jun 2009
    Posts
    3
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    RichText enabled PopupList Select issue

    I am testing win32 application. One of the window dialog has a PopupList control which display the system font.

    The issue I am facing is that, not able to select the font using select method with passing the font name, since this control are richtext enabled.

    Print(EditNote.Font.GetItemText(2)) --> It returns #2, not the actual Font Name

    EditNote.Font.Select("Courier New") -- > Does not work

    The only option i have to select the Font using Font Name since the test needs to be performed on multiple OS and
    system Font can vary in different machine so select by index will not work for me.

    I have checked the help that Silk provide rwo methods related to Rich Text (GetFontName()) but this method only support on TextField class.


    Any idea how to implement to use Font name rather than index?

  2. #2
    Junior Member
    Join Date
    Jun 2009
    Posts
    1
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: RichText enabled PopupList Select issue

    I am not familiar with font methods, but couldn't you create a baseline listing of the fonts and their index (for the current environment) and use that as a lookup to determine what index to pass into your font method?

  3. #3
    Junior Member
    Join Date
    Jun 2009
    Posts
    3
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: RichText enabled PopupList Select issue

    I thought to do that but the problem is test need to be run on different computer (OS) system where font set could vary depending on the system/language. In that case Font name vs Index will not tally.

  4. #4
    Junior Member
    Join Date
    Nov 2004
    Posts
    2
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: RichText enabled PopupList Select issue

    Can you use GetContents() to return the text or does that also return the index? If it returns the text in a list then you can search the list to know it's index and then use that in the Select()

  5. #5
    Junior Member
    Join Date
    Jun 2009
    Posts
    3
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: RichText enabled PopupList Select issue

    GetContents() also return the index in this case.

 

 

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Search Engine Optimisation provided by DragonByte SEO v2.0.36 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Resources saved on this page: MySQL 10.71%
vBulletin Optimisation provided by vB Optimise v2.6.4 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
User Alert System provided by Advanced User Tagging v3.2.8 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
vBNominate (Lite) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Feedback Buttons provided by Advanced Post Thanks / Like (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Username Changing provided by Username Change (Free) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
BetaSoft Inc.
Digital Point modules: Sphinx-based search
All times are GMT -8. The time now is 01:43 AM.

Copyright BetaSoft Inc.