Problems of UI to render with scrolling

Hello experts!

I developed an application that has a child field of verticalManager with a specific height, example:

VerticalFieldManager vfm = new VerticalFieldManager(Manager.VERTICAL_SCROLL | Manager.VERTICAL_SCROLLBAR | Manager.USE_ALL_WIDTH) {
       protected void sublayout(int maxWidth, int maxHeight) {
        int width = maxWidth;
        int height = 200;

        super.sublayout(width, height);
        setExtent(width, height);
    }};

Then, I added a few manager´s with label fields and confines internally, example:

HorizontalFieldManager hfm = new HorizontalFieldManager(Field.FIELD_LEFT);
hfm.setBorder(anyborder);
final LabelField idLabel = new LabelField("BLA ");
hfm.add(idLabel);
final LabelField idValue = new LabelField(" BLA");
hfm.add(idValue);

Well, unfortunately when appear scrolls and I scroll the last element with focus doesn´t appear.

If I scroll down again the element which should have appeared focusing appear without focus and update the point passed to the order of the day and he didn t show again, unless the item is the last one.

Any sugestion?

Best regards, Rampelotti.

I hoped the calculation would be obvious, but here are a few tips.  This means that the field is added directly to the Manager within which you want to Center.  If this isn't the case, travel managers of the field via getManager() until you get to the one you need and adjust the position of your domain with each Manager (add their x to x of your domain and their y-to-y in your domain).

1. decide in which Manager you want to visually Center your target area.  Discover the height as using int visualHeight = . getHeight();

2. find out the scope of your targeted using XYRect fieldExtent = . getExtent().

This is where you can browse your field managers until you get to the one you need.

3 calculate the position to reach:

int newScrollPosition = Math.max (fieldExtent.y - (visualHeight - fieldExtent.height) / 2, 0); cannot access a negative position

.setVerticalScroll (newScrollPosition);

If you find it useful, please mark this message as a solution for the benefit of others who may come here via search.

Tags: BlackBerry Developers

Similar Questions

  • Scrolling group problem: not all the group with scrolling content?

    Helloooow peoplez script wise.

    I was biting my nails on this problem, the last two days and still have not found a solution. Go here:

    I tried to make a window (or Panel actually, because ultimately it must be run from the EI > window > scriptname.jsx), with a scroll bar, which can scroll content in a group beside him. I can get the scroll and all group, but is the problem, just now, that the elements of x in the group, the last get cut. Like this (it is supposed to be 500 buttons):

    Screen Shot 2015-10-13 at 21.40.05.png

    The only way that I was able to get the 'internal' group grow is by not using do not align properties and manually set the .size. I know that the content is here because the last element arises, when I move the last location of points [1] upwards until he reached the top of the group. I tried to refresh the page layout (layout.layout (true); layout.resize (()) to each call of the function onChanging() of the cursor, but without success. Read a lot of forum posts beautiful and discussion by @Marc Autret and other users of scriptUI/extendscript long has this far been without success.

    TL; DR: I'm doing a group with a lot of content that I can scroll with a scroll bar.

    Here is the code snippet, I hope fairly well commented:

    {
    //scroller test
    // uncomment the temp path (replace with some image file path) and the lines inside the populateGrid() function to reproduce my problem better
    // I'm ussing an image 512x288 pixels
    
    
    //var tempPath = "/Volumes/Verbinski/02_SCRIPTING/After_Effects/stockholm/ROOT/EXPLOSIONS/Fireball_side_01/Thumbs/Fireball_Side_01_024.jpg";
    
    
    // create window
    var mWin = new Window('palette');
      mWin.size = [500,500];
      mWin.orientation = 'row';
    
    
    // If you like it, then you better put a scroller on it.
    var scroller = mWin.add('ScrollBar');
      scroller.size = [20,mWin.size[1]-40]
      scroller.minvalue = -5;
      scroller.value = scroller.minvalue;
      scroller.maxvalue = 10000; // tried changing this to all sorts of interesting numbers.
    
    
    //This should move the group, created further down.
    scroller.onChanging = function(){
      grid.location = [grid.location[0],-scroller.value];
    }
    
    
    // "Boundary" for grid (see below)
    var gridArea = mWin.add('panel',undefined,'gridArea');
      gridArea.size = [mWin.size[0]-40,mWin.size[1]-40];
    
    
    // The grid... a digital fronteer... and also container of stuff
    var grid = gridArea.add('panel',undefined,'grid');
      grid.size = [gridArea.size[0]-20,9000000000] // no matter how high I put this, it doesn't change a thing
    
    
    // Just an array for all the images to go
    var clips = [];
    // Total height gets calculated in the populateGrid function.
    var totalHeight = 0;
    
    
    function populateGrid(rows){
      var img;
      for(i=0;i<rows;i++){
      // img = grid.add('image',undefined,tempPath);
      // clips.push(img);
      grid.add('button',undefined,i);
      }
      for(i in clips){
      clips[i].location = [0,(clips[i].image.size[1]*i)]
      }
      // totalHeight = (img.image.size[1]+grid.spacing)*rows;
      // grid.size = [grid.size[0],totalHeight]
      // scroller.maxvalue = totalHeight/2;
    
    
    }
    
    
    // put x number of buttons/images into the grid
    populateGrid(500);
    
    
    // shwo to window
    mWin.show();
    mWin.center();
    }
    

    Reaally hope someone here sees this and can help out me.

    Cheers, Fynn.

    My Control Panel:

    retina 5K, 4 GHz Intel Core i7 iMac

    32 GB of RAM, 512 GB SSD HARD drive

    OSX Yosemite: 10.10.4

    AE: CS6 |  CC 2014: 13.1.1.3

    Aaalrighty, guys. It seems to me have cracked... Sort of...

    David, your version worked quite well, I just modified a bit to get the right calculation.

    The wheel now works as expected and the scroller.maxvalue is calculated as ((number of items) * height of the first item).

    Everything works fine until I have started using the automatic layout manager. The option 'fill' at least makes it really hard to understand the final height of the internal objects. So they must be defined accordingly.

    Indeed, here is my modified code (sorry, @David for resources according to the version string, you may simply copy the scroller.onChanging () and populateGrid() x parts))

    {
    //scroller test
    // I'm using an image of around 512x288 pixels
    
    var tempPath = "YOUR IMAGE HERE";
    
    // create window
    var mWin = new Window('palette');
      mWin.size = [500,500];
      mWin.orientation = 'row';
    
    // If you like it, then you better put a scroller on it.
    var scroller = mWin.add('ScrollBar');
      scroller.size = [20,mWin.size[1]-40]
      scroller.minvalue = 0;
      scroller.value = scroller.minvalue;
      scroller.maxvalue = 3000; // tried changing this to all sorts of interesting numbers.
    
    //This should move the group, created further down.
    var scrollDiary = 0;
    scroller.onChanging = function(){
      var scrollVal = Math.abs(scroller.value)-scrollDiary;
      for(i=0;i		   
  • M45 S351 problems with scrolling using the touchpad

    I have some problems with scrolling with the touchpad. In some applications, like Mozilla Thunderbird, the touchpad scrolling does not at all! If I contact the right side of the touchpad by finger in Thunderbird, I see the label of Scroll on the screen, but no scrolling occurs. What is the problem? In Opera, I need to click on the browser page to 'activate' the touchpad scrolling and it also irritates cause in IE I do not have such problems: I have lunch just Explorer and scrolling of the works from the beginning... How to solve this problem?

    [Edited by: admin on August 29, 2006 06:52]

    Fix for that is unknown to me, but it turns out that the unit has been tested only with Microsoft products (Designed for Microsoft WXP label applied on the device) and not with other third-party software of the part. This function is not only an example. There are many of them. Please don t see this as a problem.

    On this path, I will not say that you MUST use just preinstalled stuff but there are many things that you have to live with.

    Perhaps someone else knows more about it.

    Good bye

  • Satellite L500-1ZP - problems with scrolling

    My Satellite L500-1ZP has problems with scrolling via mouse, touchpad or up/down keys...; the window keep turning towards the start window and the content in the lower part can be kept still. The scroll in the pane bar right guard stutter and go back to the basic position.
    Very annoying.

    Does anyone have an idea for a viable solution?

    A little more info about your latest activities can be very useful.
    I can't imagine you have this problem all the time and I would like to know since when you have this strange problem.

    If you have installed something that can have a negative influence on the scrolling feature?
    Have you tried to roll back the BONES to the bygone era?
    Have you tried to do something to make it work again?

  • I have a problem with scrolling and typing on the computer.

    Original title: I have problems with scrolling and typinging after a minute or so without the computer trying to go in the background, any help would be great because I will to throw the mouse across the screen very soon

    as noted above, totally tired, I must right click of mouse to wake up on this page, I did it while typing grrrr big time. Help pleeeease

    Hello

    Thanks for posting your question in the Microsoft community.

    I see that you have a hard time to work with the mouse.

    1. What is the brand and model of the mouse?
    2. The problem occurs on any program or when you perform a task in a particular program?

    Try these steps and see if that solves the problem of performance of your mouse.

    Method 1:

    You can check that the mouse buttons are set correct.

    Refer to the section "Change how the mouse buttons works", from following link to learn more about the same:

    Change the settings of the mouse

    http://Windows.Microsoft.com/en-us/Windows7/change-mouse-settings

    Method 2:

    You can uninstall and reinstall the drivers for the mouse on your computer, to do so follow the steps mentioned below.

    a. click Start, click Control Panel , and then click Device Manager. If you are prompted for an administrator password or a confirmation, type the password or provide confirmation.
    b. in the Device Manager, look for the device under the mouse and other pointing devicesand then double-click the device name.
    c. click on the Driver tab, and then click uninstall the driver.

    d. restart the computer and it will automatically re - install the drivers of.

    Note:

    You can also update mouse drivers by visiting the manufacturer's Web site.

    See this link for more information:

    Updated a hardware driver that is not working properly

    http://Windows.Microsoft.com/en-us/Windows7/update-a-driver-for-hardware-that-isn ' t-work correctly

    Let us know if you need help on this question or any question about Windows.

  • UltraNav issue with scrolling

    I recently bought a SL410 and am running Windows 7 Pro 32-Bit. I have a problem with a finger and two fingers for scrolling. I've updated the drivers for the Touchpad. But the scrolling works sometimes then sometimes it works and then stops working during scrolling. I tried to turn off alone or two-finger scrolling. But it does not work. I even changed the sensitivity of the Touchpad, but it does not work. I thought I'd try the driver from Synaptics site but did not know if it works. If anyone has any other suggestions that would be great.

    OK I understand some advanced settings had to be put off. I went in intelligently check it in the Touchpad settings appear to have caused problems with scrolling. When I disabled it the Smart check the view worked much better.

  • How half of the screen any part half scrollable and another screen with scrolling

    Hi all

    I am new to BB plz help me on this.

    Right now, the problem I'm facing is to make the left part of the screen fixed. For now, I wanted to show the list of n records to the right of the screen and wanted to show three buttons on the left side of the screen. When any user will scroll to display the records I want buttons remain fixed on the left side of the screen (No_Vertical_Scroll).

    Now I create a HorizontalFieldManager in which there are two verticalFieldManager so I can split the screen.

    I did the leftVerticalManager No_Vertical_Scroll and rightVerticalManager like VERTICAL_SCROLL, but when I scroll the screen both part began to scroll for the buttons on the left side mount are still not fixed.

    Thanks in advance

    I think so

    You can set the main screen is not first with scrolling

    Add a verticalFieldManager with fixed height half of the screen, the value of the scrollable

    then add a verticalFieldManger to the value of the scrollable

    Maybe it should work

  • Firefox does not start .oam file with scrolling parallax effect and if y &gt; 740

    Hello!

    I try to explane my problem. If I place a parallax scrolling page of a lively .oam file, the .oam file does not start (as in firefox!) if the file is higher than y = 740 and if the animation with a scrolling parallax effect.

    Maybe just visit this site, you can see the problem. Please look with firefox!

    http://OAM-test.BusinessCatalyst.com/index.html

    I placed three times exactly the same oam-file with the same scrolling Parallax effects, but with different positions only y

    in safari and IE, no problem. but the third CAO does not start in firefox.

    any suggestion?

    by the way... Why firefox cannot load fonts in the oam file?

    Thank you very much in advance for any help. really need a solution as soon as possible. If there is no way to do it with oam-file perhaps another format without flash (gif)?

    Kind regards

    Ivo

    To work around the problem, you can configure initial field scroll to 1, it works with the third file oam.

    Thank you

    Sanjit

  • Connecting the frames with scroll

    Screen Shot 2013-09-06 at 12.54.32.png

    I've created a scenario planner of the wall as shown above. The month and the content below are in a floating frame that scrolls back and forth. The problem I have is that when I scroll down, I lose the months. So, I wanted to know if there is a way to connect the 2 frames with scroll separated? Really it pasted it and am sure that's not possible, so thought I would ask experts.

    Thank you very much

    Steve

    I'm sorry but I don't have time for a long answer. If you read my post above, once again, you will see that you need create two moving images.

    1. just below the month set to vertical content.

    2. one that contains the first one grouped with the months set horizontally.

    Try it and tell us.

  • Is there a way to access more of my codecs to render with AE 4.1?

    Hi all

    I am a new user using an older version of AE 4.1 on Windows 7.

    Is there a way to access more of my available codecs to render with AE 4.1?

    When I go to export in an AVI file in AE 4.1 I've only CINEPAK, DV-PAL, DV/DVCPRO-NTSC and PAL DVCPRO codecs available as a choice, click NONE for no compressed images.

    Yet when I visited to AVI in Adobe Premiere, I the CAMSTUDIO LOSSLESS, CINEPAK, INTEL IYUV, HUFFYUV and LAGARITH LOSSLESS, MICROSOFT RLE, MICROSOFT VIDEO 1, MSU SCREEN CAPTURE LOSSLESS, x264VFW - H.264 / MPEG-4 AVC and available to view with XVID MPEG-4 codecs.  I usually use the XVID MPEG-4 codec to render with for optimal quality for the size of the file, or the codec LAGARITH LOSSLESS to render with if I need to connect a file first since first verse has limited capacity to import the AVI file codec.

    Why aren't the rest of my available codecs to render with AE 4.1?

    The problems are (as seen in the screenshots below)...

    (1) the CINEPAK codec makes the correct file size and format that my project is (1280 x 720), but generates an AVI file that can not be imported in to first and cannot be converted by two different converters.

    (2) the option NONE UNCOMPRESSED makes the file size format correct but outputs an AVI so big (6 concerts) that can not be use practically in first and it will not play even in a video player.

    (3) return codecs DV-PAL, DV/DVCPRO-NTSC and PAL DVCPRO format incorrect and sizes of format (770 x 576) without worrying about what proportions is selected (as seen at the bottom of the screenshot below), resize the size of my project and they will not matter first... these peut be converted an AVI H.264 file in one of my converters first will then import , but they are always the right size and they lose sharpness if they are resized (stretched) when converting.

    Please see the screenshots below for details.

    AfterEffects_CODECcomparisons-1.jpg

    Thank you for any input,

    Digi

    Do not use the file/export option.   Use the Composition/sequence, then define your needs of output in the render queue.

    I would recommend the export of lossless files.  Codec Animation QuickTime (100% quality) was my fav back in the day.  If the files are too big, try Quicktime PhotoJPEG at good quality.  Or, make AVI uncompressed as you have and use an external encoder to convert the first requirements.  Do not use H264, it is a codec of final delivery and should not be used in your post production workflow.

    Moreover, returned to the native resolution and codec you use in your creative projects.  First will not import your DV file because the resolution does not - DV PAL must be 720 x 576 pixels, regardless of proportions.

  • Why have I no problems before media virgins email with firefox 7 (it's ok in IE8)?

    main problem is that I can't scroll in firefox 7 but can in ie8. Also often slower that IE, but only blank mail. Scrolling without jolts or auto-scrolling makes no difference

    Create a new profile as a test to see if your profile is the source of the problems.

    -> Basic - a new profile troubleshooting

    IF this new profile works, then you can retrieve your bookmarks and passwords the old profile.

    -> Recovery of data from an old profile

    Check and tell if its working.

  • I'm having problems to connect to internet with my iMac, no problems using my macbook pro in the same room, also see other peoples wifi appearing

    Having problems connecting to the internet with my iMac, no problems with my macbook pro in the same room, also seem to be picking up another Wi - Fi connection to others

    Go to > use Diagnostics wireless for you help to solve the problems of Wi-Fi on your Mac - Apple Support

  • I am XP user window (home addition) and have recently experienced a problem open a document created with Microsoft Word.

    I am XP user window (home addition) and have recently experienced a problem open a document created with Microsoft Word. I saved the file, he sent, and trying to open it it does not allow me to do. I get a pop up saying - bar FILE CAN BE USED BY ANOTHER APPLICATION, or FORMAT of FILE CAN NOT NOT BE supported BY any OF THE INSTALLED CONVERTERS OR THE FILE is maybe DAMAGED. After you click ok in the pop-up a white prosser page for Microsoft word opens. I'm trying to accomplish creating a coupon for my wife to be able to post to its customers by e-mail.

    It may be in a format that Word can not handle. They are files DOC, DOCX, XLS or or something else?

    There is an update available for the words to open the DOCX files.

    Or you may need the free viewer for Word or Excel Viewer.

    To download Microsoft Office converters and viewers:

    http://www.Microsoft.com/downloads/en/resultsForProduct.aspx?displaylang=en&ProductID=4289ae77-4cba-4A75-86f3-9ff96f68e491&sType=n_pf

    MD MOEEN AJAZ KHAN - MCP, N +, A +.

  • having problems connecting to some websites with spa3102

    Hello

    I have problems connecting to some websites with spa 3102.

    The error message I get is as follows.

    The connection was reset

    The connection to the server was reset while the page is loading.

    * The site may be temporarily unavailable or too busy. Try again in a few
    moments.

    * If you are unable to load any pages, check your computer's network
    connection.

    * If your computer or network is protected by a firewall or proxy, make sure that
    that Firefox is permitted to access the Web.

    When I connect to my ISP modem directrly, so I'm able to connect to these Web sites.

    Any ideas?

    I already had the latest firmware (software Version: 5.1.10 (GW))

    But I think the problem is now resolved. Sites that I couldn't visit were my suppliers Web hosting and my own domain. Previously, I had activated attacking and that my hoster somehow registeren my mac address.

    Here are the settings that I had to change the spa3102.

    MAC Clone settings
    The Service Enable MAC Clone: Yes cloned MAC address: xxxxxxxxxxxx

    thx for your help.

  • With scrolling status bar?

    Hello

    I would like to develop a status bar with scroll. I managed to do it using HorizontalFieldManagar and adding as setStatus.

    What I need, is there two buttons back and forward in the two corners at the bottom. These two buttons must be set and when I click next then only it must scroll, but the position of the previous ones and should not change.

    Can someone let me know how?

    We hope to get an answer soon.

    Thank you & best regards

    Sunil

    I don't remember if TableLayoutManager is actually any notice of them, but the official way to do this is to use the Styles in the buttons, Field.FIELD_BOTTOM | Field.FIELD_LEFT for the button on the left for example.  But if it works or not will depend on the TableLayoutManager.  If this does not work, then maybe you can change the TableLayoutManager to force it?

Maybe you are looking for

  • Stand remove Acer T272hl bmjjz

    Need to remove the stand. It seems to be some sort of spring mechanism, but I don't see any screws, trees or any other means to remove the support. In another post, it has been verified that the support is in fact removable. Any ideas?

  • 'A homegroup can be created on a home network', but I'm on a home network

    When I try to create a homegroup on my Windows 7 Professional Home computer, I get the message error "a homegroup can be created on a home network. But my network is defined on a home network. I tried him affecting the Public value or work and then a

  • 1.3 of the ISE and NAC

    I have a client that 5508 WLCs runs through the area, and I'm catching IEEE802.1x authentication for the enterprise WLAN and WebAuth for WLAN of comments... they PSK now :( They have ad and ISE and NAC great interest, so my immediate thoughts are to

  • Canon mx870 on mac parallels windows 7

    Airport extreme, on the mac side print, parallels / windows 7 is not, before dlink did not have this problem

  • BlackBerry Smartphones User Agent help

    Can someone tell me what the user agent should be for a Blackberry Bold 9650 running OS 6? Thank you