Set position of dialogbox depending on screen resolution

Hi,
Could you tell me how I can set the position of a dialogbox container (CL_GUI_DIALOGBOX_CONTAINER)depending on the current screen resolution?
Thank you for your help,
Fabian

Hi,
When u create the Dialogbox object,u have the option of specifying the height,width of the dialog container.
Dialog container
     go_dialog_container        TYPE REF TO cl_gui_dialogbox_container,
CREATE OBJECT go_dialog_container
         EXPORTING
      PARENT                      =
           <b>width                       = 400
           height                      = 150</b>           style                       = cl_gui_control=>ws_sysmenu
      REPID                       =
      dynnr                       = '100'
      LIFETIME                    = lifetime_default
           <b>top                         = 100
           left                        = 350</b>           caption                     = 'My dialog box'
      NO_AUTODEF_PROGID_DYNNR     =
      METRIC                      = 0
      NAME                        =
         EXCEPTIONS
           CNTL_ERROR                  = 1
           CNTL_SYSTEM_ERROR           = 2
           CREATE_ERROR                = 3
           LIFETIME_ERROR              = 4
           LIFETIME_DYNPRO_DYNPRO_LINK = 5
           EVENT_ALREADY_REGISTERED    = 6
           ERROR_REGIST_EVENT          = 7
           others                      = 8.
       IF sy-subrc <> 0.
     Do some error handling..............
       ENDIF.
Hope it helps u.
Kindly reward point if u find it useful.
Thanks&Regards,
Ruthra

Similar Messages

  • Setting page break automatically according to screen resolution.

    i want to set the page break according to page breaking?
    help please?

    nivetha wrote:
    I have used Free Design Layout for desiging my screens.Is there any issue with the layout used?I am not familiar with the Layout and do not find it under the API listings for Java 1.6.0_07.
    I see, I just caught a NetBeans thread--you're using the GUI Builder in NetBeans. That layout you mentioned is not a layout, but a description of what they call their method of GUI generation--it still uses a regular Java Layout in that autogenerated GUI code.
    You're question is not a Java question, but rather, a query on if NetBeans has some problems with it's GUI Builder in the version of NetBeans that you are using. It would be more appropriate to ask that question over on the NetBeans site unless you can look in the autogenerated code and tell us what Layout you are using.

  • BDC: Table Control Screen Resolution

    Hi Abapers,
    1.In BDC while handling table control , how to handle screen resolution , that means in some systems i can see 5 item entries , in some systems i can see 10 item entries how to handle this , can u  send the Code relating this.
    With Regards
    Bhaskar Rao.M

    hi
    The numeber of lines of table control for BDC depend on screen resolution, but It can't be managed by program.
    So the better solution is to create a bdc doesn't depend on resolution.
    It can do that using always the first two lines of table control.
    When you start the simulation, first record has to be placed in first line of tc and the second in second one.
    Before placing the third record, it needs to place the second record to the top and so the third record can be placed in the second line.
    Before placing the next record, it needs to place the third record to the top and so the fourth record can be placed in the second line and so.
    In this way your BDC'll use alwways the first two lines of tc and your program won't depend on resolution.
    The problem is the transaction you need to simulate by BDC has to have a scroll functionality to allow to place the last record was elaborated to the top of tc, so the second line of tc can always be used to place the new record.
    If there isn't this functionality, it's better to use a BAPI instead of BDC.
    check these two
    BDC - standard screen resolution required?
    https://forums.sdn.sap.com/click.jspa?searchID=739193&messageID=823953
    reward points if found helpful

  • BDC - standard screen resolution required?

    Is screen resolution a factor to check before carrying out any BDC with table control.

    hai Peterson,
    The numeber of lines of table control for BDC depend on screen resolution, but It can't be managed by program.
    So the better solution is to create a bdc doesn't depend on resolution.
    It can do that using always the first two lines of table control.
    When you start the simulation, first record has to be placed in first line of tc and the second in second one.
    Before placing the third record, it needs to place the second record to the top and so the third record can be placed in the second line.
    Before placing the next record, it needs to place the third record to the top and so the fourth record can be placed in the second line and so.
    In this way your BDC'll use alwways the first two lines of tc and your program won't depend on resolution.
    The problem is the transaction you need to simulate by BDC has to have a scroll functionality to allow to place the last record was elaborated to the top of tc, so the second line of tc can always be used to place the new record.
    If there isn't this functionality, it's better to use a BAPI instead of BDC.
    regards,
    Srikanth

  • Set desktop wallpaper based on screen resolution for both WinXP and Win7

    I'm hoping someone can answer this for me. I would like to be able to set the desktop wallpaper based on the current screen resolution when a user logs in. I've made several .BMP files for varying resolutions with our corporation logo. But, say
    if a wallpaper for a resolution of 1024x768 on a 4:3 monitor is set, then that monitor is replaced with a 16:10 monitor with a resolution of 1280x800 or 1600x900, the wallpaper looks stretched out and ugly. The only way to change it is manually on
    each computer, but most end users (students) would not have permissions to do so.
    I thought this question would have been asked before, but after many, many searches, I've only come across one reference that copies the background from a network share to a location on the local computer, which I found
    here. In my case, the file will already be on the local computer, but I am not sure how to force the system to change the wallpaper based on the current screen resolution. I'm sure it is possible and maybe I am overlooking something very simple. I
    was also thinking that this would either happen only once on first login or maybe based on user authentication (which group the user belongs to) so that teachers are still able to change their wallpaper, but students would not be able to.
    If it helps, I will be deploying the image using MDT 2010 Update 1. The same base image will be used on multiple machine types (HP desktop sand laptops and Lenovo desktops) which could have one of 6-7 different monitor types connected. I'd also like
    this to happen on the local machine instead of GPO or logon script as there is already a lot happening there.
    I would need to be able to do this for both Windows XP Pro and Windows 7 Ent x64. The XP machines will mostly have 4:3 monitors, but there are exceptions.
    Maybe what I am asking isn't entirely possible or possible at all. I, unfortunately, am in the extremely early stages of learning Microsoft Scripting (VBScript and PowerShell) to use with MDT 2010, so I know next to nothing when it comes to these scripting
    processes, but am willing to try and learn.
    Any help anyone can suggest, I would be extremely grateful.

    I almost abandoned this because I thought it was going to interfere with using BGInfo. But, as it turns out, I was able to incorporate the running of BGInfo into a script that I
    created. And, once I saw what 16:10 Aspect Ratio background looked like on a 16:9 Aspect Ratio screen, I was not satisfied.
    I happened to use the first script that MkShffr posted from geekshangout.com, but then I added more items to it. I also created three high-res wallpaper backgrounds as suggested
    by pagerwho.
    My script is based on the Aspect Ratio of the current resolution. Since most, if not all, systems will get the resolution set during deployment, this was easy to calculate.
    And by forcing the output of the Aspect Ratio to two decimal places, I just used a Case statement to select which aspect ratio to choose from and apply the wallpaper assigned to it. I thought about using If Then statements, but I think the Case statement
    is much cleaner.
    And, because BGInfo wants to change the Picture Position to "Tile" instead of "Fit" that I manually set it to in my image, I added two reg key change lines per Case. BGInfo still
    changes the Picture Position to "Tile", but for whatever reason, this works. I tested this by using a laptop with a 16:9 Aspect Ratio screen. In my image, I manually set a 16:10 wallpaper because that will be the primary Aspect Ratio used in our corporation,
    however we are getting more 16:9 Aspect Ratio laptops and from what HP is saying, everything will be standardizing on this Aspect Ratio.
    I made sure the Screen profile that I saved in my image was loaded which includes the 16:10 wallpaper. I then placed this script in the “C:\ProgramData\Wallpaper_Change”
    directory that I created in the image. I then added a registry value in HKLM\System\Microsoft\Windows\CurrentVersion\Run and created a String Value. I did this so that it would run at log in, but I didn't want it to show in the Startup Folder in the All Programs
    Menu. It takes less than a second to run, but it seems to work well. I tested it several time to see if there were any anomalies, but it seemed to work great each time. I have yet to test it with a computer that is on the domain with a regular user account,
    which I will be doing in the next day or two.
    In the mean time, if someone want to try it out and see if it works from thier use, here is the code. I did comment out the wscript.echos, but left them in to use for troubleshooting
    in the future.
    -Mike
    ==============================
    Option Explicit
    Dim array_ScreenRes, screenRes_X, screenRes_Y, oIE, width, height, aspect_ratio
    Dim decpos, wallpaper1, wallpaper2, wallpaper3, oShell
    array_ScreenRes = GetScreenResolution
    screenRes_X = array_ScreenRes(0)
    screenRes_Y = array_ScreenRes(1)
    wallpaper1="C:\Windows\Web\Wallpaper\TSC\Win 7 - 2560 x 1440 (16-9)TSC.bmp"
    wallpaper2="C:\Windows\Web\Wallpaper\TSC\Win 7 - 2560 x 1600 (16-10)TSC.bmp"
    wallpaper3="C:\Windows\Web\Wallpaper\TSC\Win 7 - 2560 x 1920 (4-3)TSC.bmp"
    Set oShell = CreateObject("Wscript.Shell")
    'wscript.echo "Resolution is " & screenRes_X & "x" & screenRes_Y
    aspect_ratio = screenRes_X/screenRes_Y
    decpos=instr(aspect_ratio,".")+2
    aspect_ratio=left(aspect_ratio,decpos)
    'wscript.echo "Aspect Ratio is " & aspect_ratio
    Select Case aspect_ratio
    Case "1.77"
     oShell.RegWrite("HKCU\Control Panel\Desktop\Wallpaper"), wallpaper1
     oShell.RegWrite("HKCU\Software\Microsoft\Internet Explorer\Desktop\General\WallpaperSource"), wallpaper1
     oShell.RegWrite("HKCU\Control Panel\Desktop\TileWallpaper"), "0"
     oShell.RegWrite("HKCU\Control Panel\Desktop\WallpaperStyle"), "6"
    Case "1.6"
     oShell.RegWrite("HKCU\Control Panel\Desktop\Wallpaper"), wallpaper2
     oShell.RegWrite("HKCU\Software\Microsoft\Internet Explorer\Desktop\General\WallpaperSource"), wallpaper2
     oShell.RegWrite("HKCU\Control Panel\Desktop\TileWallpaper"), "0"
     oShell.RegWrite("HKCU\Control Panel\Desktop\WallpaperStyle"), "6"
    Case "1.33"
     oShell.RegWrite("HKCU\Control Panel\Desktop\Wallpaper"), wallpaper3
     oShell.RegWrite("HKCU\Software\Microsoft\Internet Explorer\Desktop\General\WallpaperSource"), wallpaper3
     oShell.RegWrite("HKCU\Control Panel\Desktop\TileWallpaper"), "0"
     oShell.RegWrite("HKCU\Control Panel\Desktop\WallpaperStyle"), "6"
    End Select
    oShell.Run "%windir%\System32\RUNDLL32.exe user32.dll,UpdatePerUserSystemParameters", 1, True
    oShell.Run "C:\ProgramData\BGInfo\BGInfo.exe C:\ProgramData\BGInfo\TSC.bgi /timer:0"
    Function GetScreenResolution()
     Set oIE = CreateObject("InternetExplorer.Application")
     With oIE
        .Navigate("about:blank")
        Do Until .readyState = 4: wscript.sleep 100: Loop
        width = .document.ParentWindow.screen.width
        height = .document.ParentWindow.screen.height
     End With
     oIE.Quit
     GetScreenResolution = array(width,height)
    End Function

  • Software to restore apps window size and position after change in screen resolution

    I use a 27' iMac'10 with SL 10.6.8, running it at 2560x1440 screen resolution.
    Whenever I have to attend meetings via GoToMeeting or Webex and need to present, the resolution is too high, since most participants are on 15' laptops or even iPad's these days.  Therefore, I reset the screen resolution to 1600x900 for the time of the presentation.
    After the meeting is over, I reset the resolution back to 2560x1440.
    Problem: After the reset, all my apps are scaled and out of place, so I need to manually reset them to their original sizes and positions.  I use Divvy to make this a bit less painful, but still it's a manual chore.
    Is there any software out there that let's me restore my windows to the exact settings they were the last time before I changed screen resolution?

    I agree, the ability to remember window sizes and positions when switching between laptop and using the Thunderbolt display would be very useful.  It's like your Mac remembering the volume level depending on whether you have headphones plugged in or not.

  • How to set Dynamic screen resolution in flex..?

    Hi All.,
    I am developing a flex application in adobe flex4. to set the application height is 100% width is 100% and using <flexmdi:MDICanvas> to set the height 780 ,so application get displayed on normal window correctly., But i try to press f11 key the screen size is expanded at the time application size is set exactly, MdiCanvass size is  not expanding on screen resolution.
    My question is how can I make sure that the application should look uniform across different platform/different browsers and different monitors to display screen resolution auto adjust in mdi canvass also.
    With Regards.,
    LinFlex-

    Hi,
    Use the below syntax...
    CALL TRANSACTION tcode... OPTIONS FROM opt
    ... OPTIONS FROM opt
    Effect
    Allows you to control processing using the values of the componetns of the structure opt, which must have the ABAP Dictionary type CTU_PARAMS. The components have the following meanings:
    DISMODE
    Display mode (like the MODE addition)
    UPDMODE
    Update mode (like the UPDATE addition)
    CATTMODE
    CATT mode (controls a CATT)
    CATT mode can have the following values:
    ' ' No CATT active
    'N' CATT without single-screen control
    'A' CATT with single-screen control
    DEFSIZE
    Use default window size
    RACOMMIT
    Do not end transaction at COMMIT WORK
    NOBINPT
    No batch input mode (that is, SY-BINPT = SPACE)
    NOBIEND
    No batch input mode after the end of BDC data.
    The components DEFSIZE , RACOMMIT, NOBINPT, and NOBIEND always take the following values:
    'X' Yes
    ' ' No
    If you do not use the OPTIONS FROM addition, the following control parameter settings apply:
    DISMODE
    From addition MODE
    UPDMODE
    From addition UPDATE
    CATTMODE
    No CATT active
    DEFSIZE
    Do not use default window size
    RACOMMIT
    Successful end on COMMIT WORK
    NOBINPT
    Batch input mode active ( SY-BINPT = X
    NOBIEND
    Batch input mode remains active after the BDC data
    Jogdand M B

  • I cannot enlarge photos on Facebook, I only get a BLACK, BLANK screen when I click on them-someone suggested it might be "Screen Resolution Setting"? I've already uploaded new firefox version. Please help!

    I am not able to ENLARGE photos on Facebook, this means photos that friends post on News Feed & photos that I post in my FB photo albums. I only get a BLANK, BLACK screen when I click on individual photos. A friend suggested that I upload the New Firefox, and I did this today, but it did not resolve problem. Friend also suggested that it could be "Screen Resolution Setting"?? OR "Data Rate" too slow?? I do not know how to check these features? Please help! If it could be something else, please let me know. Thank you for your time & help!

    Start Firefox in [[Safe Mode]] to check if one of the add-ons is causing the problem (switch to the DEFAULT theme: Tools > Add-ons > Appearance/Themes).
    * Don't make any changes on the Safe mode start window.
    See:
    * [[Troubleshooting extensions and themes]]
    You can use these steps to check if images are blocked:
    * Open the web page that has the images missing in a browser tab.
    * Click the website favicon ([[Site Identity Button]]) on the left end of the location bar.
    * Click the "More Information" button to open the "Page Info" window with the Security tab selected (also accessible via "Tools > Page Info").
    * Go to the <i>Media</i> tab of the "Tools > Page Info" window.
    * Select the first image link and scroll down through the list with the Down arrow key.
    * If an image in the list is grayed and there is a check-mark in the box "<i>Block Images from...</i>" then remove that mark to unblock the images from that domain.
    See also:
    * http://kb.mozillazine.org/Images_or_animations_do_not_load

  • What should I set me screen resolution to in photoshop CC with my late 2009 27" iMac?

    What should I set me screen resolution to in photoshop CC with my late 2009 27" iMac?

    If its native resolution is 2560x1440 then some people do find it marginal with a 27 inch screen, but I'd have thought it workable if you know where everything is.  People are using that screen res on tiny laptops, but to be fair, they are not much liking it with Photoshop.
    I don't know how Retina support works with CC, but I wonder if you could force it on your iMac?
    Any Mac users out there know how Retina support works?

  • Accidental​ly set my screen resolution too high

    I was playing around with screen resolutions and accidentally set one too high and now every time i load up my Computer, it says 'Input not supported' , please help me.

    It would help greatly if you:
    A) Identified the installed operating system
    B) Identified your HP desktop PC. (look on the service tag. Post the complete  p/n
    If your OS is Windows 7, start the operating system in Safe Mode. Press the power button and before Windows begins to boot, start tapping the F8 key. Choose Safe Mode.  In Safe Mode click on the start button and type  msconfig in the search all programs and files box . Click on the msconfig icon that appears above to invoke msconfig. In the msconfig dialog choose the Boot tab as in the following image. In Boot options put a tick inside the box to the left of base video, then click on apply and OK. Restart your PC and  right-click an unused area on the desktop and set your resolution. Choose the recommended resolution.  After you do that, go back to the msconfig and remove the tick mark in the Boot options -->Base video, click on OK and restart your PC. All should be back to normal again.
    The desktop I am using has a dual display setup, so yours will appear a bit differently. the operatng system will recommend an optimal resolution and designate it as recommended.
    Best regards,
    erico
    ****Please click on Accept As Solution if a suggestion solves your problem. It helps others facing the same problem to find a solution easily****
    2015 Microsoft MVP - Windows Experience Consumer

  • [Solved] Set Screen Resolution in Openbox

    Is there a utility to set the screen resolution in Openbox?
    Last edited by Wintervenom (2008-09-26 07:43:03)

    You can make an Openbox submenu with various xrandr settings.
    Like so:
    <menu id="res-menu" label="Resolution">
    <separator label="Resolution"/>
    <item label="1280x1024">
    <action name="Execute">
    <execute>
    xrandr -s 1280x1024
    </execute>
    </action>
    </item>
    <item label="1024x768">
    <action name="Execute">
    <execute>
    xrandr -s 1024x768
    </execute>
    </action>
    </item>
    <item label="800x600">
    <action name="Execute">
    <execute>
    xrandr -s 800x600
    </execute>
    </action>
    </item>
    Of course, you need to have those modes defined in xorg.conf.
    Last edited by moljac024 (2008-09-26 00:06:37)

  • How do I change the screen resolution on my Dell PC back to the original setting after itune change ?

    How do I change my Dell PC screen resolution back to the original setting after itune resolution changes

    Hi penguin05,
    Welcome to Lenovo Community Forums!
       First without the projector connected
               Right click on your desktop screen and select "Screen Resolution"
                 you will get this page
    Spoiler (Highlight to read)
    Now Connect your projector and make sure that the display is now on your projector.
       under Display: Set it to your projector
                 -Change the Orientation: to Landscape View then hit Apply.
    Let me know your findings
    Regards
    Solid Cruver,
    Did someone help you today? Press the star on the left to thank them with a Kudo!
    If you find a post helpful and it answers your question, please mark it as an "Accepted Solution"! This will help the rest of the Community with similar issues identify the verified solution and benefit from it.
    Follow @LenovoForums on Twitter!

  • How to set screen resolution in BDC

    hi pls give info regarding how to set resolution for screen
    thank you
    Ravi

    hi,
    For screen resolution use ctu_params, with default size
    Data : f_option type ctu_params,
    f_option-updmode = 'S'.
    f_option-defsize = 'X'.
    f_option-dismode = 'N'.
    call transaction 'VA01' using bdcdata options from f_option messages into bdcerror.
    CALL TRANSACTION tcode... OPTIONS FROM opt
    ... OPTIONS FROM opt
    Effect
    Allows you to control processing using the values of the componetns of the structure opt, which must have the ABAP Dictionary type CTU_PARAMS. The components have the following meanings:
    DISMODE
    Display mode (like the MODE addition)
    UPDMODE
    Update mode (like the UPDATE addition)
    CATTMODE
    CATT mode (controls a CATT)
    CATT mode can have the following values:
    ' ' No CATT active
    'N' CATT without single-screen control
    'A' CATT with single-screen control
    DEFSIZE
    Use default window size
    RACOMMIT
    Do not end transaction at COMMIT WORK
    NOBINPT
    No batch input mode (that is, SY-BINPT = SPACE)
    NOBIEND
    No batch input mode after the end of BDC data.
    The components DEFSIZE , RACOMMIT, NOBINPT, and NOBIEND always take the following values:
    'X' Yes
    ' ' No
    If you do not use the OPTIONS FROM addition, the following control parameter settings apply:
    DISMODE
    From addition MODE
    UPDMODE
    From addition UPDATE
    CATTMODE
    No CATT active
    DEFSIZE
    Do not use default window size
    RACOMMIT
    Successful end on COMMIT WORK
    NOBINPT
    Batch input mode active ( SY-BINPT = X
    NOBIEND
    Batch input mode remains active after the BDC data

  • Setting screen resolution in OpenBoot

    I just got a new LCD KVM switch just will not support the default Screen Resolution in Openboot(1152x900?)
    I entered this command
    ok setenv output-device screen:r1024x768x60
    output-device = screen:r1024x768x60
    ok reset-all
    But the setting just doesn't seem to register as the system stil boots up with the default resolution.
    I'm using a Sun clone from Donovan with an UltraSPARC-IIi with Openboot version 3.14.0.
    Am I doing anything wrong?

    Well I tried the command on an Ultra60 Creator3D workstation and it seem to work just fine. I guess its the onboard graphics of the Donovan workstation thats giving me the problem. So it's a different issue.

  • Screen Resolution is "Out of Scan Range" -- Need Help Re-Setting

    My daughter accidentally set her screen resolution on her Mac Mini too high for the Sony monitor we have attached. The screen went blank and then flashed "Out of Scan Range", at which time she then confirmed the higher setting by hitting "return". So now we're stuck - a totally blank screen.
    I tried booting in Safe Mode and found that the screen was once again properly set to 1024 x 768, so I thought we had this solved. But when re-starting in regular mode, the screen went blank again ... its as if safe mode is not "saving" the reverted screen size for regular boot mode. My last test was to try to boot from the CD installer, but the only option is to re-install the OS from scratch, something I'd really like NOT to do.
    Any other ideas on how to restore the screen settings?

    Great News!

Maybe you are looking for

  • Itunes not backing up my ipod touch!

    I have a 4th generation ipod touch. When i try to download software 4.3.5 it doesnt let me because i cant back up. I have deleted my previous back up and that has not worked. Some details: I have ipod software 4.3.4 I have windows XP I have McAfee fa

  • Itunes was not installed correctly please reinstall. :(

    After upgrading itunes it says ' itunes was not installed corectly please reinstall so i uninstalled everything apple : bonjour apple application support , quicktime ....., than installed itunes again nothing ! same message i'v tried dowload microsof

  • Transfering a case structure to event structure

    Hi, I am trying to transfer case structures that are currently set up to a control that if on prompt the user where to save and then save all following files to that location till end of program and if off the do nothing. I would like to enable these

  • Table maintenance generator - + symbol instead of field label

    Hi All, I have created the table maintenance generator for the table and I have created theh transaction code the same as like SM30 and if I execute that transaction ocde, I can see all the fields with the correct description at the initial screen le

  • Executable file for IMAQ VIs

    Hi friends,                  I am back here after a long gap. Now I am again in full time research and using LabVIEW as the programing platform as usual. I am working on image processing and have designed a code recently for a small image analysis pu