+ Reply to Thread
Results 1 to 5 of 5

Problem with UiToolbar_Text

This is a discussion on Problem with UiToolbar_Text within the Modding & Development forums, part of the Meizu M8 category; Hello everyone! I'm trying to do an app called Chuck Norris Facts which will allow you to read and know ...

  1. #1
    Passing By
    Join Date
    Jun 2010
    Posts
    4
    Thanks
    4
    Thanked 0 Times in 0 Posts

    Problem with UiToolbar_Text

    Hello everyone!

    I'm trying to do an app called Chuck Norris Facts which will allow you to read and know about his facts .

    But the thing is I have difficulties using UiToolbar_Text, when I change its text in the program I have to scroll the textbox so that the text refreshes

    Here's an extract of the code :

    Code:
            textBox.SetLineSpace(10); 
            textBox.SetPos(0,0,GetWidth(),GetHeight()-MZM_HEIGHT_TEXT_TOOLBAR); 
             
            textBox.SetText(facts[RandNumber]); 
            textBox.SetReadOnly(true); 
            AddUiWin(&textBox);
    And later in the code :

    Code:
            textBox.SetText(facts[RandNumber]);
    But when this executes I have to scroll the textBox in order to refresh the text, have I forgot something?

  2. #2
    Moderator
    Join Date
    Mar 2008
    Location
    Germany
    Posts
    1,723
    Thanks
    96
    Thanked 358 Times in 141 Posts
    update with Invalidate();

    (or UpdateWindow(); ??)

    did you use:

    MZ_DECLARE_DYNAMIC(Wnd);
    and
    MZ_IMPLEMENT_DYNAMIC(Wnd)
    [Meizu M8 - FAQ] [Meizu M9 Tips and Tricks]

    No Support over PM. Please use the Forum.

  3. Member who thanked crimson05 for the post:


  4. #3
    Passing By
    Join Date
    Sep 2009
    Posts
    9
    Thanks
    6
    Thanked 1 Time in 1 Post
    Haha, Sheldon and Wolowitz > The bigbang theory! Verygood tv series.

  5. #4
    Junior Member
    Join Date
    Jun 2010
    Location
    France
    Posts
    56
    Thanks
    5
    Thanked 3 Times in 3 Posts
    Yeah you're right dude!!!

    Scissors cuts paper, paper covers rock, rock crushes lizard, lizard poisons Spock, Spock smashes scissors, scissors decapitates lizard, lizard eats paper, paper disproves Spock, Spock vaporizes rock, and as it always has, rock crushes scissors.
    Meizu M8 SE White 16 GB with PET screen. Fw : 9.9.23
    Headphones : Sennheiser HD 212Pro and
    Sony MDR-SA 5000



  6. #5
    Passing By
    Join Date
    Jun 2010
    Posts
    4
    Thanks
    4
    Thanked 0 Times in 0 Posts
    :D

    I am a horny engineer, I never joke about math or sex.