Antwort auf: NavBar und Fenstergröße @Jo.Keller

Startseite Foren Deutsches LiveCode-Forum NavBar und Fenstergröße @Jo.Keller Antwort auf: NavBar und Fenstergröße @Jo.Keller

#13343
Klaus Major
Administrator

    Hallo Joachim,

    Du kannst doch jederzeit mit:

    ...
    put the width of this stack into tBreite
    ...

    die aktuelle Breite des Stacks ermitteln.
    Diese Info dann einfach zum „skalieren“ Deines NavBars verwenden:

    ...
    put the width of this stack into tBreite
    
    ## Nun manipulieren wir das RECT des Navbars:
    ## the rect of xyz = x1,y1,x2,y2 = links, oben,rechts,unten
    put the rect of widget "NavBar" into tRect
    
    ## So verändern wir nur die Breite eines Objektes, 
    ## Dein NavBar sitzt ja ganz links, also x1 = 0 
    ## und wir können diesen Trick anwenden:
    put tBreite into item 3 of tRect
    
    ## Und...
    set the rect of widget "NavBar" to tRect
    ## ... fertig! :-)
    ...

    Gruß

    Klaus