Results 1 to 4 of 4

Thread: <posX>, <posY> incorrect relative to grid cells

  1. #1
    Automated Home Lurker
    Join Date
    Jan 2012
    Posts
    8

    Default <posX>, <posY> incorrect relative to grid cells

    Hi all

    I am trying to greate a grid of textboxes. There are 2 textboxes in ecah grid cell - first one occupies the upper part of the cell, second occupies the pottom part.

    I am specifying tb locations relative to the cell origin.
    For the upper tb

    <posX>+30</posX>
    <posY>+0</posY>

    for the lower tb

    <posX>+30</posX>
    <posY>+40</posY>

    I would expect that no matter gridX and gridY are the texboxed would have the same alignment relatively to the cell boundaries.

    Unfortunately when I specify gridX and gridY other than 0,0 the texboxes drif in x or y direction. The higher the values of gridX, gridY the more is the drift.

    I am attaching xapconfig.xml that demonstrates this behavior. Any help highly appreciated
    Attached Files Attached Files

  2. #2
    Moderator Kevin's Avatar
    Join Date
    Jan 2004
    Location
    West Yorkshire
    Posts
    552

    Default

    I think I would have expected the same ;-)

    A solution would be to use absolute x, y positioning of the textboxes - not ideal but should work

    K

  3. #3
    Automated Home Lurker
    Join Date
    Jan 2012
    Posts
    8

    Default

    Kevin, thanks for your reply. From my (still embryonic) knowledge of flash I can see that you are using ScreenWidth variable that is set to constant value of 800 (which is fine for Joggler). Then you use this value to calculate buttonGutterWidth. The same applies to ScreenHeight/buttonGutterHeight.

    is it possible to calculate ScreenWidth/ScreenHeight based on the value of <usejogglerapi> tag? If this tag is true then screen width/height are fixed to 800x420 for joggler. Otherwise initialize ScreenWidth/ScreenHeight with Stage.width/Stage.height to get the real size of the browser window plus add some onResize listener to update ScreenWidth/ScreenHeight accordingly when the window is resized.

    Thanks in advance

  4. #4
    Moderator Kevin's Avatar
    Join Date
    Jan 2004
    Location
    West Yorkshire
    Posts
    552

    Default

    Bear in mind this is essentialy a Joggler application that happens to run in a browser / other Flash capable devices too.

    Supporting different sizes is something that I had intended to do but never implemented. Beta 6 (unreleased) had some provisional work in this area. Part of the issue on the Joggler is that there isn't a stage with dimensions in the same way that there is in standard Flash but using <usejogglerapi> to alter behaviour would be a possibility.

    Resizing as the browser window changes - i.e. I assume you mean the whole interface scaling to retain the same number of horizontal and vertical grid positions / buttons is something that would be quite compute intensive but do-able. OTOH there are as many people who would want the other combinations with more grid positions available or the displayed screen remaining fixed in size as the browser is resized.

    K

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •