Group Abstract Group Abstract

Message Boards Message Boards

Mastering Dynamic in using OverLay

Posted 4 years ago
POSTED BY: Andrew Meit
3 Replies
Posted 4 years ago

Ok, after some pondering and tinkering, I am very close to what I want, thanks to your code and rethinking about using TabView.

Clear[tabvw1, pne, pnes]; tabvw1 =   (pne[dta_] := 
     Pane[Grid@Partition[dta, UpTo[5]], {200, 100}, Scrollbars -> True];    pnes = {pne[Range[10]], pne[Range[100]], 
      pne[Characters["Hello there, dance with me."]]};    Grid[{{SetterBar[
        Dynamic[x], {pnes[[1]] -> " Set 1 ", pnes[[2]] -> " Set 2 ", 
         pnes[[3]] -> " Set 3 "}],
       ActionMenu[
        "Actions", {"Beep" :> Beep[], "switch" :> (x = 2)}]}, {Dynamic[
        x]}}, Spacings -> 0]); tabvw1
POSTED BY: Andrew Meit
Posted 4 years ago
POSTED BY: Andrew Meit
Posted 4 years ago

So, independent of styling, I think this is close to what you're asking for:

Grid[
 {{SetterBar[Dynamic[x], {1, 2}], 
   ActionMenu[
    "Actions", {"Beep" :> Beep[], "switch" :> (x = 2)}]}, {Dynamic[
    x]}},
 Spacings -> 0]

As for difficulty of designing UI widgets with Mathematica, I'm not sure what your end goal and vision are. I recommend you defer wrangling with style and layout until after you've got functionality working. I recommend you use the "built in" tools (particularly Manipulate) and avoid directly accessing low level controls unless absolutely necessary. As for layout, I'd avoid using Overlay for your core UI. Grid is a very versatile and feature-rich function, so try it first.

POSTED BY: Eric Rimbey
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard