facebook

dynamic positioning of text widgets: CLOSED

💡
Our Forums Have Moved

For help with installation, bugs reports or feature requests, please head over to our new forums.
Genuitec Community on GitHub

  1. MobiOne Archive
  2.  > 
  3. Getting Help – General
Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #327501 Reply

    dabbelju
    Member

    Hi Community,

    I am facing teh following issue and I hope someone can help. I did write a news APP.

    On the detail page of the news, I have 5 text widgets one below the other. The text I am displaying has different length (for example one news is just a few lines another one has a lot of lines). In the different widgets I am displaying the title, the description, the article and so on.

    Is there a way I can position text widgets according to the length of the previous text widget?

    Thanks and best regards
    Christian

    #327674

    @dabbelju

    I’ve never tried befored. I’ve been thinking a solution and did some test with text widgets. But, didn’t get something useful. A workaround I can propose you is the next:

    You should use a panel to append html code in it. Create a custom.css file wich contains the styles for each text widget that you have.

    $('#m1-text1-panel1-scroller').append('<div id="m1-title" class="m1-text">Title</div>');
    

    For include your .css file in your project you can use the next code in the phoneui.documentreadyhandler function:

    $("head").append("<link rel='stylesheet' href='your_file.css' type='text/css'/>");
    

    The text on each div have to be the text you use to populate your currents text wdigets. After you append all the <div> tags in your panel, they must be shown one below other.

    Let me know if I was clear or if you need assist with the proposed workaround

    #327695

    dabbelju
    Member

    Hi octavio,

    thanks for your reply. Yesterday evening I have had the same thought and it is working great.

    BTW: Hoe can I close a topic?

    Thanks and best
    Christian

    #327700

    Hi dabbelju,

    Good to know that you solved your problem. We leave the topics open to allow users with similar questions to participate in them, but I will mark this one as closed

Viewing 4 posts - 1 through 4 (of 4 total)
Reply To: dynamic positioning of text widgets: CLOSED

You must be logged in to post in the forum log in