Dynamically changing width of controls

hi,
how to achieve dynamically changing width of controls on a webpage? For example, the width of a button should be according to the length of its caption... Thanks, Girish

thanx for help, Samir! what I want exactly is: vary the width of controls on the screen. for example, if I have two buttons named "assignment" and "help", I want the width of the buttons to be different (and be proportionate to) as per the length of the caption. what kind of JavaScript code shoud I write to achive this? Pls help out... thanks,Girish

Similar Messages

  • Dynamically change width of field

    I have matrix report. One field must dynamically change width...I think create trigger. He'll change width. But I don't  found function (analog set_item_property in oracle forms). This function must get x-coordinate.  And another function  set width field.
    Help me, please. I solve this problem for more than 2 weeks
    I attached a picture. (example).
    Reports Builder 10

    select trunc(tran.DATE)
      ,t.NAME "t_name"
      ,svt.NAME "type_name"
      ,tran.route_num
      ,rts1.Description "point1"
      ,rts2.DESCRIPTION  "point2"
      ,N||'.'||NN CAT
      ,COUNT(N||NN)
      from table1 tran
      ,table2 svt
      ,table3  rts1
      ,table3  rts2
      ,table4 rt
    where tran.t_id=trc.id and
          tran.st_id=svt.st_id and
        tran.zn_in=rts1.stop(+) and
          tran.zn_out=rts2.stop(+) and
         tran.create_date BETWEEN   :pbegin  AND  :pend  and
          (trc.id = :p_id )
    group by trunc(tran.DATE)
             ,t.NAME
             ,svt.NAME
             ,tran.route_num
             ,rts1.DESCRIPTION
             ,rts2.DESCRIPTION
      ,N||'.'||NN

  • Dynamically changing width of web form

    Folks,
    I'm sure someone must have come up with the same problem as me.
    We have a forms 6i system running on the intranet (IE5). The forms fill the whole of the browser window if the client PC has a resolution of 800 X 640, but for larger resolutions (like 1024 X 768), the form only occupies part of the browser window. Now, I know that this is dependent on the 'WIDTH=' and 'HEIGHT=' parameters on the formsweb.cfg file. Indeed, if I increase these values, and then run the system on PC's that have resolutions of 1024 X 768, then the forms now look OK. But of course, this now causes a problem where the PC's have lower resolutions! What I want to do, is to dynamically change the WIDTH and HEIGHT parameter values dependent on the users machine settings. I can use javascript to get the users' PC details - no problem. But when I try to code this into the BASEJINI.HTM file, then I cannot run the system at all. I don't think I can use javascript directly in the FORMSWEB.CFG file, as it isn't a 'html' file.
    Has anyone else had this problem ? - you must have if you develop forms on the web with different resolutions settings. And how did you guys get around it?
    Please help!
    Harry
    null

    thanx for help, Samir! what I want exactly is: vary the width of controls on the screen. for example, if I have two buttons named "assignment" and "help", I want the width of the buttons to be different (and be proportionate to) as per the length of the caption. what kind of JavaScript code shoud I write to achive this? Pls help out... thanks,Girish

  • Dynamic Changes in Table control

    Hi
    is that possible to change the table control dynamically

    Hi Rob
    my requirement is data upload from Excel to table control is over now
    some of my TL said that if i add more fields and records in that Excel than uplod the data to table control

  • Changing width of a custom container dynamically

    Hi,
    I have an ABAP report that has 2 custom containers on a screen: CC1 on the left, showing a tree and another one (CC2) consuming the rest of the screen. Depending on what node the user selects in the tree (left CC), I would like to dynamically adjust the width of CC1 and CC2.
    Is there a way to do it? I found the method SET_WIDTH of CL_GUI_CUSTOM_CONTAINER (which CC1 and CC2 are instances of), but it does not seem to work.
    Any help is appreciated.
    Guenther

    Here is a coding example that demonstrates dynamically changing the width of the container.
    What you cannot see is the screen definition.  Screen 100 has a single custom container that fills the entire screen and is set to be resizable.  The container name is 'MY_CONTAINER'.  Next screen is set to 0.
    Flow logic of screen:
    PROCESS BEFORE OUTPUT.
      MODULE pbo.
    PROCESS AFTER INPUT.
    Cut and paste this program and define the screen.  Run the program and keep hitting ENTER to see the size change from left to right.  After 9 times, the program will end.
    REPORT  zcdf_docking_example.
    DATA:
      w_sash           TYPE sy-index,
      r_cstm_ctnr      TYPE REF TO cl_gui_custom_container,
      r_easy_splt_ctnr TYPE REF TO cl_gui_easy_splitter_container.
    CLASS cl_gui_easy_splitter_container DEFINITION LOAD.
    DO 9 TIMES.
      w_sash = sy-index * 10.
      CALL SCREEN 100.
    ENDDO.
    MODULE pbo OUTPUT.
      IF r_cstm_ctnr IS INITIAL.
        CREATE OBJECT r_cstm_ctnr
             EXPORTING container_name = 'MY_CONTAINER'.
        CREATE OBJECT r_easy_splt_ctnr
               EXPORTING
                 parent = r_cstm_ctnr
                 orientation =
                   cl_gui_easy_splitter_container=>orientation_horizontal.
    *   Set starting sash position.  Position is a percentage.
        CALL METHOD r_easy_splt_ctnr->set_sash_position
               EXPORTING
                 sash_position = w_sash.
    *   Put ALV in left container.
    *    CREATE OBJECT r_alv_grid1
    *           EXPORTING
    *             i_parent = r_easy_splt_ctnr->top_left_container.
    *   Put ALV in right container.
    *    CREATE OBJECT r_alv_grid2
    *           EXPORTING
    *             i_parent = r_easy_splt_ctnr->bottom_right_container.
      ELSE.
        CALL METHOD r_easy_splt_ctnr->set_sash_position
               EXPORTING
                 sash_position = w_sash.
      ENDIF.
    ENDMODULE.                 " pbo  OUTPUT
    Let us know how it goes.

  • Dynamically changing sandboxRoot?

      I want to change the sandboxRoot of an iframe dynamically but changing the property before changing the .src of the iframe to load the new url has no effect. The original url is loaded instead of from the application directory.
    document.getElementById("frame1").sandboxRoot = root;
    document.getElementById("frame1").src = newsrc;
       am I missing something? Thanks.

    thanx for help, Samir! what I want exactly is: vary the width of controls on the screen. for example, if I have two buttons named "assignment" and "help", I want the width of the buttons to be different (and be proportionate to) as per the length of the caption. what kind of JavaScript code shoud I write to achive this? Pls help out... thanks,Girish

  • Best Practice: Dynamically changing Item-Level permissions?

    Hi all,
    Can you share your opinion on the best practice for Dynamically changing item permissions?
    For example, given this scenario:
    Item Creator can create an initial item.
    After item creator creates, the item becomes read-only for him. Other users can create, but they can only see their own entries (Created by).
    At any point in time, other users can be given Read access (or any other access) by an Administrator to a specific item.
    The item is then given edit permission to a Reviewer and Approver. Reviewers can only edit, and Approvers can only approve.
    After the item has been reviewed, the item becomes read-only to everyone.
    I read that there is only a specific number of unique permissions for a List / Library before performance issues start to set in. Given the requirements above, it looks like item-level permission is unavoidable.
    Do you have certain ideas how best to go with this?
    Thank you!

    Hi,
    According to your post, my understanding is that you wanted to change item level permission.
    There is no out of the box way to accomplish this with SharePoint.               
    You can create a custom permission level using Visual Studio to allow users to add & view items, but not edit permission.   
    Then create a group with the custom permission level. The users in this group would have the permission of create & add permission, but they could no edit the item.
    In the CodePlex, there is a custom workflow activities, but by default it only have four permission level:
    Full Control , Design ,Contribute and Read.
    You should also customize some permission levels for your scenario. 
    What’s more, when use the SharePoint 2013 designer, you should only use the 2010 platform to create the workflow using this activities,
    https://spdactivities.codeplex.com/wikipage?title=Grant%20Permission%20on%20Item
    Thanks & Regards,
    Jason
    Jason Guo
    TechNet Community Support

  • How to dynamically change the text of a TextObject with embedded DataField?

    Hi
    I'm trying to dynamically change the text of a TextObject at runtime, by using the .NET library. My problem is that if one or more DatabaseFieldDefinition is embedded inside my text, I'm unable to change the "static text" only, by keeping the field, e.g. I have :
    Text1 => "Contact Name: {Contact.Name}"
    and I'd like to change it to anything else like:
    Text1 => "Nom du Contact: {Contact.Name}"
    Half of my TextObject is static text while second part comes from the dataset.
    (of course the translation is dynamic - it is called at run-time and the new value to be set depends on the calling application language)
    If I simply modify the Text property of my TextObject, the {Contact.Name} embedded field is not evaluated anymore by the Crystal Engine, but considered as a single text.
    Using formulas or parameters looks quite difficult, because it means having many ones just for translation needs - I cannot control the way my users will create their reports and "force them" to use complex methods just in order to put a text and a value together...
    Anyone knows how to deal with that ?

    Only way I can think of doing this:
    1) Create a formula (call it lang) and enter the string "Contact Name" in it
    2) Place the  {Contact.Name} field next to the string
    3) So now you have:
    ContactName:  {Contact.Name}
    4) Check what localization you are after. If you need "Nom du Contact", change the lang formula so it shows "Nom du Contact" using the code below:
    Imports CrystalDecisions.CrystalReports.Engine
    Imports CrystalDecisions.Shared
    Public Class Form1
    Inherits System.Windows.Forms.Form
    Dim Report As New CrystalReport1()
    Dim FormulaFields As FormulaFieldDefinitions
    Dim FormulaField As FormulaFieldDefinition
    Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
    FormulaFields = Report.DataDefinition.FormulaFields
    FormulaField = FormulaFields.Item(0)
    FormulaField.Text = "[formula text]"
    CrystalReportViewer1.ReportSource = Report
    End Sub
    I realize this may not give you consistent spacing as the translations may have strings of differnt length. Perhaps someone has other idea(s)...

  • Dynamic Table Width for XML Renderer

    Hi Guys,
    I'm looking for a way to get a XML documents with a dynamic table width.
    Using a dynamic result table doesn't work.
    The test program looks like this.
    REPORT  xml_test.
    TYPE-POOLS: ixml.
    DATA: go_ixml TYPE REF TO if_ixml.
    go_ixml = cl_ixml=>create( ).
    DATA:  go_xml_document TYPE REF TO if_ixml_document.
    go_xml_document = go_ixml->create_document( ).
    DATA: go_xml_root_elm TYPE REF TO if_ixml_element.
    go_xml_root_elm  = go_xml_document->create_simple_element(
               name = 'flights'
             parent = go_xml_document
             value  = 'Texas Flight' ).
    DATA: go_xml_main_elm TYPE REF TO if_ixml_element.
    go_xml_main_elm  = go_xml_document->create_simple_element(
                  name = 'airline'
                parent = go_xml_root_elm  ).
    DATA: lv_rc TYPE i.
    lv_rc = go_xml_main_elm->set_attribute( name = 'code' value = 'LH401' ).
    DATA: go_xml_streamfactory TYPE REF TO if_ixml_stream_factory.
    go_xml_streamfactory = go_ixml->create_stream_factory( ).
    * Static Creation of X tab ---------------------------------------------
    DATA: BEGIN OF gs_xml_line,
             data(255) TYPE x,
           END OF gs_xml_line.
    DATA:  gt_xml_table       LIKE TABLE OF gs_xml_line,
           gv_xml_size        TYPE i,
           go_ostream         TYPE REF TO if_ixml_ostream.
    * END Static Creation of X tab ------------------------------------------
    * Dynamic Creation of X tab ---------------------------------------------
    FIELD-SYMBOLS: <lf_x_tab>  TYPE STANDARD TABLE,
                   <lf_x_stru> TYPE ANY.
    DATA: lt_fldcat TYPE lvc_t_fcat.
    DATA: lr_tab TYPE REF TO data,
          lr_stru  TYPE REF TO data,
          ls_fldcat TYPE lvc_s_fcat,
          lv_dyn_width TYPE i.
    lv_dyn_width = 255.
    * Append Dynamic Field.
    CLEAR ls_fldcat.
    ls_fldcat-fieldname = 'DATA' .
    ls_fldcat-datatype  = 'X'.
    ls_fldcat-inttype   = 'X'.
    ls_fldcat-intlen    = lv_dyn_width.
    APPEND ls_fldcat TO lt_fldcat .
    * Create dynamic internal table and assign to FS
    CALL METHOD cl_alv_table_create=>create_dynamic_table
      EXPORTING
        it_fieldcatalog = lt_fldcat
      IMPORTING
        ep_table        = lr_tab.
    ASSIGN lr_tab->* TO <lf_x_tab>.
    * Create dynamic work area and assign to FS
    CREATE DATA lr_stru LIKE LINE OF <lf_x_tab>.
    ASSIGN lr_stru->* TO <lf_x_stru>.
    CHECK sy-subrc  = 0.
    * END Dynamic Creation of X tab ------------------------------------------
    * Static Table works
    go_ostream = go_xml_streamfactory->create_ostream_itable( table = gt_xml_table ).
    * Dynamic Table doesn't work
    go_ostream = go_xml_streamfactory->create_ostream_itable( table = <lf_x_tab> ).
    * Show result
    DATA: go_renderer        TYPE REF TO if_ixml_renderer.
    go_renderer = go_ixml->create_renderer( ostream  = go_ostream
                                            document = go_xml_document ).
    lv_rc = go_renderer->render( ).
    gv_xml_size = go_ostream->get_num_written_raw( ).
    DATA: lv_str  TYPE string,
          lv_xstr TYPE xstring.
    LOOP AT gt_xml_table INTO gs_xml_line.
      lv_xstr = gs_xml_line-data.
      CALL FUNCTION 'HR_KR_XSTRING_TO_STRING'
        EXPORTING
    *                          FROM_CODEPAGE       = '8500'
          in_xstring          = lv_xstr
    *                          OUT_LEN             =
       IMPORTING
         out_string          = lv_str.
      WRITE: / lv_str.
    ENDLOOP.
    If the static table is used, the program gets a result, but it doesn't work with the dynamic table.
    * Static Table works
    go_ostream = go_xml_streamfactory->create_ostream_itable( table = gt_xml_table ).
    * Dynamic Table doesn't work
    go_ostream = go_xml_streamfactory->create_ostream_itable( table = <lf_x_tab> ).
    Any Ideas?
    Thanks in advance
    Dominik

    I've never used dynamically changing popup items variable before, and I'm not sure it will work(?)
    But, if it's displaying a long string, it does not sound like 'items' is being assigned a proper table yet.
    I don't know what you mean by a  "chunk" of values. I assume you mean table.
    In any case, if SYPNEventResults[1].title is a string, then SYPNEventResults[1].value can be any legal lua type.
    Likewise for SYPNEventResults[2], SYPNEventResults[3], ...
    If you can index/display the title with this syntax, e.g. LrDialogs.message( SYPNEventResults[1].title ), then the popup should be initialized thusly:
    viewFactory:popup_menu {
           items = SYPNEventResults,
           value = LrView.bind('eventname2'),
           width_in_chars = 40,
    if a function is returning multiple values, then to get it into a table "array", do this:
    local tableArray = { myTableArrayFunc( myTableArrayParameters ) }
    Does this help?
    Rob

  • How to change width of cell in Excel using LabVIEW 5.1

    Enable program to change width of cell in Excel 97 file using LabVIEW 5.1.

    You must have an automation reference to the workbook or the worksheet. Using Application Control pallette find the Property and Invode nodes and wire up the following, cascading the output of each node into the reference of the next:
    Start with worksheet reference
    Invoke Range
    Property Entirecolumn
    Property Columnwidth
    Change Columnwidth to write and wire in the numeric value in pixels.
    Michael
    [email protected]
    http://www.abcdefirm.com
    Michael Munroe, ABCDEF
    Certified LabVIEW Developer, MCP
    Find and fix bad VI Properties with Property Inspector

  • Can we change width of the column at runtime

    I have a report with columns assigned runtime, can we change width of the colimn runtime?
    for example Query: select &lp_1, &lp_2 from emp &LP_Where
    if i assign lp_1 empno size 10 and empname size 50. Vertical and horizantal elasticty is not going work for me. Any suggestions please..
    Lalitha

    Doubt there is the dynamic you are seeking.
    But you may put a few overlapped columns (diff. length of course) and display/hide by passing parameters.

  • Dynamically Change UIBBs in GAF. Is it possible ?

    Hello,
    I have a query in FPM to which I would like to draw your attention to.
    Can I dynamically change my UIBBs within a single mainstep in FPM GAF ? if so, which method can help me do this  ?
    I created a single Web dynpro Component with 5 component configurations.
    I am controlling the visibility of several UI elements within this single component through these component configurations.
    Each configuration refers to a business scenario.
    I configured this single interface view at the UIBB level with the configuration name for a main step.
    I was able add multiple uibbs at this level with different configuration names.
    Now, I do not know how to toggle between these UIBBs?. I do not  want to create multiple variants
    because all the other main steps are same for all the business scenarios.
    Thanks for your time.
    Regards,
    Kiran

    Hello Kiran,
    This is achieveable. You need to implement the IF_FPM_GAF_CONF_EXIT WD interface in your AppCC. This interface provides a method OVERRIDE_EVENT in the component controller of your AppCC. This method has an importing parameter IO_GAF which has various methods to help you change the configuration of the application at runtime and also the UIBB's on a particular mainstep.
    Regards
    Rohan

  • Skinning table. Change width of the table.

    I want to change width of all table so that sub-control-bar gets affected too. I've learned that there's no way to define it that way:
    af|table {
    width:60%;
    and if I write:
    af|table::content {
    width:60%;
    and then change width of sub-control-bar component to the same amount it doesn't look the same...

    Hello,
    I have a similarly problem. I use an addRemoveList in my page and I want to set the width of the two lists to static value (like width=300px and not width=auto). Can you tell me if this is possible in Java Studio Creator 2?
    Thank you!

  • How Can you dynamically change a canvas frame title?

    I am looking for a way to dynamically change the title of a frame on a canvas.

    Jim,
    frames on a canvas are graphic objects that cannot be controlled using properties. To obtain dynamic frame labels, all you can do is to have a Display Item instead of the frame label.
    Frank

  • How to dynamically changes items properties

    How to dynamically changes items properties likes position order in tabular view, width, prompt

    Many object properties can be set programmatically at runtime. For example, each window object has a Visible property that can be set to either Yes or No to show and hide the window. At runtime, you can call the built-in procedure SET_WINDOW_PROPERTY to show or hide the window dynamically, as shown here:
    Set_Window_Property('my_window',VISIBLE, PROPERTY_ON);
    The following built-in procedures are available for setting object properties at runtime:
    -     SET_BLOCK_PROPERTY
    -     SET_CANVAS_PROPERTY
    -     SET_FORM_PROPERTY
    -     SET_ITEM_PROPERTY
    -     SET_LOV_PROPERTY
    -     SET_MENU_ITEM_PROPERTY
    -     SET_PARAMETER_ATTR
    -     SET_RADIO_BUTTON_PROPERTY
    -     SET_RECORD_PROPERTY
    -     SET_RELATION_PROPERTY
    -     SET_VIEW_PROPERTY
    -     SET_WINDOW_PROPERTY
    The built-in procedure SET_ITEM_PROPERTY can be used to set the properties of any type of item, including buttons, text items, check boxes, radio groups, etc.
    Note: Radio group items include individual radio buttons; use SET_ITEM_PROPERTY to set the properties of the radio group, and SET_RADIO_BUTTON_PROPERTY to set the properties of the individual buttons in the group.
    Each built-in SET procedure has a corresponding GET function that allows you to programmatically determine the current setting of an object's properties. The following example uses GET_WINDOW_PROPERTY to determine if a window is currently hidden (VISIBLE = FALSE). If the window is hidden, SET_WINDOW_PROPERTY is called to show the window.
    If Get_Window_Property('my_window',VISIBLE) = 'FALSE' THEN
    Set_Window_Property('my_window',VISIBLE,PROPERTY_ON);
    To determine if a particular property can be set programmatically, refer to the property descriptions in online Help.

Maybe you are looking for

  • Limitation on LD_LIBRARY_PATH on Solaris box

    Hi All, I am using Tuxedo v8.0 on Solaris 2.8 box. This tuxedo server guides other servers to start up after issuing "tmboot -y" command. Following error I can see if the LD_LIBRARY_PATH is too long. <i>"CMDTUX_CAT:819: INFO: Process id=1281 Assume s

  • TS1382 My nano 5th gen keeps freezing when I try to play radio, I have reset it numerous times.

     

  • SPLIT ... AT '#' INTO ?

    Hi, I'm reading values from a CSV file using GUI_UPLOAD. The CSV file uses spaces as separators. The spaces appear in the internal table that contains the lines of the CSV file as '#'-symbols. Now I want to fill the lines from the internal table into

  • Why can i buy, but not rent, certain movies on apple tv?

    I rented Batman Begins last night with no problems and then thought I'd watch The Dark Knight tonight but it's only available to buy, not to rent. I understand that some movies are restricted based on the requirements of the distributor but it seems

  • Subtemplate problem using XSL tags.

    Hi, I am working on XML Publisher reports. I am using subtemplate.rtf in maintemplate.rtf, but i am ending up with warning after submitting concurrent program. My subtemplate.rtf: (It prints a blank row)-- I registered in INV Application and code nam