ABAP WD: Dynamic UI programming for controlling font size

Hi,
I have a table with 2 columns: TreeByNestingTableColumn which has textview with ID 'NAME1' and ordinary table column which has textview with ID 'VALUE1'.
I am using the event OnLoadChildren for populating TreeByNestingTableColumn.
Everything works fine, except that I need to show the value of textview 'NAME1' within TreeByNestingColumn in different fonts based on the value in column 'VALUE1'.
I figured out I would have to use WDDOMODIFYVIEW for this.
I guess I would have to access the TABLE UI element, get the rows, loop at each row, get the value of column 'VALUE1' and set the font of 'NAME1' based on its value.
My code looks something like this:
data: text_view1 type ref to CL_WD_TEXT_VIEW,
  text_objecttype  type ref to CL_WD_TEXT_VIEW,
  text_table type ref to CL_WD_TABLE,
  element type ref to IF_WD_CONTEXT_ELEMENT,
  ui_value type string,
  wd_table_column type ref to cl_wd_table_column,
  wd_table_columns type standard table of ref to cl_wd_table_column.
text_table ?= view->GET_ELEMENT( ID = 'COURSEDETAILS' ).
wd_table_columns = text_table->get_columns( ).
loop at wd_table_columns into wd_table_column.
      text_view1      ?= view->GET_ELEMENT( ID = 'NAME1' ).
      text_objecttype ?= view->GET_ELEMENT( ID= 'VALUE1' ).
ui_value = text_objecttype->GET_TEXT( ).
CONDENSE ui_value.
      if ( ui_value <> 'L' ).
        text_view1->SET_DESIGN( VALUE = '09' ).
      endif.
    ENDLOOP.
  endif.
The problem is that I do not need columns, but I need rows and I have not been able to figure out how to get rows and in this example 'VALUE1' always gets the value of first row.
1) Could you please give me a sample code how to do it?
2) In my case the code within WDDOMODIFYVIEW has to be always called (I can not use if first_time = abap_true)since I fetch the data in the table through OnLoadChildren event and in that case I would have to always loop through table contents in the WDDOMODIFYVIEW. Is there a better way than this?
Regards,
Srini.

Hi Srini,
ok, in that case you must use cell-variants. In the column element there is a property called selectedCellVariant. This is bound to a new attribute of the context-node to which the table bounds. Fill the attribute with unique id for each element(row). Then, in wddomodify()
1) loop over the context
2) determine the row you like to change
3) create a new view element and set the design
4) create a new cell and pass the variant key
5) add the new view element to the cell object
6) add the cell object to the column
Following find some code for a linkToAction element
   lr_lta = cl_wd_link_to_action=>new_link_to_action(
                        view       = view
                        on_action = 'GO'
                        text      = ls_data-default_value ).
   lr_standard_cell = cl_wd_table_standard_cell=>new_table_standard_cell(
                       view        = view
                       variant_key = ls_data-variant ).
   lr_standard_cell->set_editor( lr_lta ).
   lr_table_column->add_cell_variant( lr_standard_cell ).
regards, Ulli

Similar Messages

  • Print-controls for changing font size & cpi

    Hi ,
      I want to know how to use print-controls in ABAP-simple reports for changing font size & cpi for headings and then detail list should be with different font & cpi.
    please help with example.
    thanks
    Vinayak.

    Hi Vinayak,
    Just use the command PRINT-CONTROL CPI <characters per inch> and PRINT-CONTROL FONT <fontname> to switch from CPI and Font wherever you like.
    Regards,
    John.

  • Controlling Font Size in Preview

    Is there a way to increase font size in Preview before printing? The default is too small for me, and I don't see where to control font size.
    Thanks.

    Yes, you'd have to load them, (HTMLs), into another APP, say Text Edit even, select all, then set the Font and/or size before saving as a PDF.
    Once it's a PDF, it preserves the Font, size and everything else.
    Another Option would be to load the PDFs into a PDF editor, say Acrobat Pro, and change the size there.

  • Controlling Font Size in Character Mode Reports

    Hi,
    The default Font size of Character mode Reports is 12. I want to reduce the font size from 12 to 8 .How to go about it.The printer codes mentioned in reports Documentation only talk about other attributes like Bold etc.Also the documentation gave the impression that The fontsize can only be controlled for Bitmap reports.Kindly help me out.
    Thanks in advance.
    Regards
    Deepak

    Deepak:
    The font size for character reports is based in the printer size characters, there are: 10, 12 15 20 etc.
    I believe that you want is a smaller character, try to configure your printer with condensed font in the panel of the printer, if you can't do that, try send printer codes to the printer via printer definition file.
    For the printer code that you need, check the user's manual of the printer to know what code is that you need.
    Look for commands in your manual
    Good luck.
    Ennio

  • Photoshop showing two different sizes for same font size

    Hi folks,
    I've been using Photoshop for a long time, but this problem has popped very rarely along the way and some how remedied itself - I'd like to know this time what's causing it, and how to solve it.
    I'm in a Photoshop document, and I'm working with two different text areas. Both area registering as 14px in size in the Type menu, and yet, they're radically different in size. One is tiny, whilst the other is at least twice, maybe thrice the size. Why is this happening?
    I've checked there's no overlapping text areas and things like that, everything should be fairly normal, it just isn't.
    I'm using Adobe Photoshop CS6 v13.1.2 x64 for Mac, running on a Macbook Pro Retina 1.83ghz and 8GB ram
    Thanks in advance    

    it seems is that in CS6 when you change your font size using free transform - it "remembers" the original pt size when you select the text itself in a certain way:
    The Problem
    I am writing the text in 50 pt size
    I duplicated the document and scaled the text using free transform in 150%
    now when I click inside the text more than once and select some of the letters or even just move the indicator more than once
    it shows me it is still 50pt which is of course not true.
    so as it appears photoshop can occasionally give you the text size before you made a transformation
    The Solution
    a way to get around that is to click only once and drag through at the same time with the first initial click
    now you can see the true font size is 75 pt and not 50 pt.
    to contribute to the confusion it appears the font size in the toolbar stays the same "wrong" size so beware of that
    and if you want to be really sure you can select just the layer in the layer panel (not the text)
    and you will get your "true" font size.
    I made the same test in photoshop CC  14.2.1 and it does not act this way but instead it gives you the "true" font size even if you scale it in free transform
    and select clicking more than once.
    hope this will clarify the matter.

  • Controlling Font size in alv grid using oops

    Hi Experts,
    I have a requirement where i want to change the font size of the grid title bar.
    Is there any way of acheiving this.
    I do see a  method set_title size in the class cl_gui_alv_grid. However it is a protected method and i am not able implement it in my program.
    Any pointers on this would be higly appreciated.
    Thanks and Regards,
    Jey sabith Ebron

    Hi
    I tried and it worked with me.
    The grid title was indeed changed from the the method Set_Title_Size.
    To use the method you have to Create a Local Class Inheriting the Class CL_GUI_ALV_GRID.
    CLASS ZCL_GUI_ALV_GRID DEFINITION INHERITING FROM CL_GUI_ALV_GRID.
      PUBLIC SECTION.
        METHODS TITLE_SIZE.
      PRIVATE SECTION.
    ENDCLASS.                    "ZCL_GUI_ALV_GRID DEFINITION
    Then use the above method in the Implementation part as .
    CLASS ZCL_GUI_ALV_GRID IMPLEMENTATION.
      METHOD TITLE_size.
        ME->SET_TITLE_SIZE( EXPORTING SIZE = 1
                            EXCEPTIONS ERROR = 1  ).
      ENDMETHOD.
    ENDCLASS.
    Now when your reference variable should be
    Data :GRID type ref to ZCL_GUI_ALV_GRID.
    and Create the Object as
    CREATE OBJECT GRID
               EXPORTING I_PARENT = G_CUSTOM_CONTAINER1.
    Before Calling Set_table_for_ first_display, Call the created method
    CALL METHOD GRID->TITLE_SIZE.

  • I am facing  problem for mix font size in RDF reports .Please help me ?

    Hi all,
    I am using oracle reports developer 11g v 1.2.3 .
    My problem is regarding PDF output from RDF reports . I have reports that contain Text  ..When i generate PDF output my text area shows different font size for BOLD text.
    I have uploaded image .Below is link for it .
    (portion Highlighted in Yellow is bold text and it changes its font size.
    View image: 1 14 2014 2 52 53 PM
    Please help me to overcome this problem.
    Thanks,
    HPSQLDEVELOPER

    Did you generate the report in Builder or in Reports server?
    Please provide the OS details and how you are running the report.

  • What happened to the permanent setting for the font, size, color of e-maild I send?

    I used to be able to go to settings and put in the font, size, color that I wanted to use for all the e-mails I write. I can no longer find it. Also the size I am using when read by the receiver of the e-mail is way larger than what I have written it in. Is there no longer a way to put in the font etc. you want to always use in writing an e-mail?
    mlj

    Sorry--I just found my own answer.
    mlj

  • Podcast App controls / font size?

    The controls are dark and the fonts are microscope sized - especially the slider to move the playback position forward and backward.  Is there a way to change the controls or the font size to something usable?!

    Some gestures have been removed in Firefox 4.
    You can restore the zoom feature by changing the values of the related prefs on the <b>about:config</b> page.
    browser.gesture.pinch.in -> <b>cmd_fullZoomReduce</b>
    browser.gesture.pinch.in.shift -> <b>cmd_fullZoomReset</b>
    browser.gesture.pinch.out -> <b>cmd_fullZoomEnlarge</b>
    browser.gesture.pinch.out.shift -> <b>cmd_fullZoomReset</b>
    browser.gesture.pinch.latched -> <b>false</b>
    To open the <i>about:config</i> page, type <b>about:config</b> in the location (address) bar and press the "<i>Enter</i>" key, just like you type the url of a website to open a website.<br />
    If you see a warning then you can confirm that you want to access that page.<br />
    * http://kb.mozillazine.org/about:config

  • My touchpad no longer controls font size in foxfire, which means I can't read some of my emails, WHY?

    How can I change font size on my email? I used to be able to use the touch-pad on my laptop. It no longer works in firefox but still works on document files, so it's YOUR FAULT!! It always worked until I installed firefox 4.

    Some gestures have been removed in Firefox 4.
    You can restore the zoom feature by changing the values of the related prefs on the <b>about:config</b> page.
    browser.gesture.pinch.in -> <b>cmd_fullZoomReduce</b>
    browser.gesture.pinch.in.shift -> <b>cmd_fullZoomReset</b>
    browser.gesture.pinch.out -> <b>cmd_fullZoomEnlarge</b>
    browser.gesture.pinch.out.shift -> <b>cmd_fullZoomReset</b>
    browser.gesture.pinch.latched -> <b>false</b>
    To open the <i>about:config</i> page, type <b>about:config</b> in the location (address) bar and press the "<i>Enter</i>" key, just like you type the url of a website to open a website.<br />
    If you see a warning then you can confirm that you want to access that page.<br />
    * http://kb.mozillazine.org/about:config

  • Tree view control font size

    Hello,
    (LabVIEW 8.0): I have found that the font size of the tree view items can be set at design time from the drop down list on the menu bar.  However, is it possible to make each "level" (i.e. parent = a level, child = different level, grandchild = still another level) have a different font size to clearly differentiate one level from the next?
    Thanks,
    Chris 

    try a property node...
    Attachments:
    Clipboard-2.jpg ‏76 KB

  • Java program for installing font on windows

    Hi,
    I want to write a java program that installs required fonts on windows machine. On my machine windows is installed on "C:\WINDOWS" directory.
    So, naturally "c:\WINDOWS\Fonts" directory I want to paste my font files.
    I am writing file handling code for the same. But, how to know dynamically the location of windows installation directory?
    I tried using System.getProperty("windir"), but it is not working?
    Can somebody help me?
    regards,
    Anand

    1) Use VB
    2) Who said that such a property exists?
    3) In Java 1.5, use System.getEnv()

  • Changing default email program for Control Click file to use Outlook

    Hi,
    We have an interesting issue when when you Control click a file and select "New email with Attachment" it always brings up Mail, I want to change this to Outlook (latest office for Mac). I have checked everywhere for this setting and made sure Outlook is set as the default mail program everywhere.
    Can someone point me in the right direction and this would be a quick win for out customer.
    Thanks,
    Bob James

    "New Email with Attachment" is a Service provided by Mail.app. To use Outlook, you would need an Outlook service. If Microsoft doesn't provide one, it might be possible to make your own using Automator. If you search, somebody might have already done that.

  • How to control font size in express vi windows popups?

    My Windows XP user interface uses many popup messages generated by the "Display Msg" express vi.  Is there a way to customize the appearance of those popups, e.g. larger font?
    Jeff
    Climbing the Labview learning curve!
    Sanarus Medical
    Pleasanton, CA

    If I'm correct you can change any express VI into normal (static) VI's.
    Open the front panel of the pop-up VI and select the text, now change the font from system into something different.
    Ton
    Free Code Capture Tool! Version 2.1.3 with comments, web-upload, back-save and snippets!
    Nederlandse LabVIEW user groep www.lvug.nl
    My LabVIEW Ideas
    LabVIEW, programming like it should be!

  • Need advice for controlling MB size when reducing image size.

    I'm downsizing a large batch of images that all need to end up as 1.5 to 2 MB jpegs. All of the images from my camera start at the same MB size in the RAW files, When I export/resize them they come out in varied sizes, in this case from 1.4 MB to 3.8 MB. I seem to have come across something that seems very simple that is kicking my butt. Are any of you aware of a way to control the image file size instead of pixel dimension when downsizing?

    Please provide the LR version (i.e. 3.6, 4.1,??) you are using and ALL of the Export settings used for both the single and multiple file (i.e. "batch) Export. Did you use  the exact same settings for both, and did you do anything differently for the sinlge file versus multiple file export? There should be absolutely no difference between the two, unless you changed some settings, or inadvertently used different files. For example, if you shoot raw + JPEG you may have accidently used the JPEG instead of raw for one of the Exports. This may give you slightly different Export file sizes.
    stockphotog.miller wrote:
    trshaner, I have no idea why the files have to be that size, that's just the requirements of the customer. I'm trying to convert from RAW to jpeg.
    You need to talk to your customer about this requirement. As dj_page and I have already told you this makes no sense! I think your customer is confusing "open file size" (i.e. camera megapixels) with "actual file size." Using a Canon 5D MKII raw image:
    Camera Megapixels (Mp) = 5,616 x 3,744 = 21.03 Megapixels = 21.03 (Mp) x 3 (RGB) x  x 2 (16 bit data) = 120 MB (126,189,568 bytes)
    1 Megabyte= 1,048,576 bytes
    LR Export File Size
    TIFF, ProPhoto RGB, No Compression, 16 bit depth = 120.0 MB
    TIFF, ProPhoto RGB, ZIP Compression, 16 bit depth = 101.9 MB (lossless compression)
    JPEG, sRGB, 100 Quality  = 13.9 MB (JPEGs are 8 bit depth lossy compression)
    JPEG, sRGB, 90 Quality =     7.6 MB (JPEGs are 8 bit depth lossy compression)
    JPEG, sRGB, 80 Quality =      4.8 MB (JPEGs are 8 bit depth lossy compression)
    ALL of the above image files contain the exact same number of Camera Megapixels (i.e. have the same resolution)!
    Message was edited by: trshaner
    Corrected TIFF no compression file size.

Maybe you are looking for

  • From alv to standard transaction

    Hi, Iam using alv hiereracy for a report. say i have a material field in header if i double click can i take me to mmo3 . if yes pls let me know how to proceed with this thanks swathi

  • How to write a validaton rule for Cost Center and plant in PO

    Hi, I need to write a Validation Rule for Cost center and Plant in Purchase Order to get the error message if the Plant and cost center combination didnot match. But i am not sure in which transaction code do we need to write this validation. Kindly

  • Merge two full-screened safari windows' bug under lion

    Hi there, After installed lion, i found an obviously bug in safari. 1. Open safari, enter full-screen mode. 2. Creat a new safari window (not a new tab), then it will moved into a other full-screen automaticlly. 3. Click in menu bar : window>merge al

  • Screen not turning off

    why is my screen not turning off during a conversation - when I put it to my ear the screen does not turn off and I touch the hold and all the other buttons while talking. I tried switching it off and restarting it . thx

  • How to transport the  text elements

    hi guru's,   i need answer to this question.   how to transport the text elements in the sap script?