Group Abstract Group Abstract

Message Boards Message Boards

[WSG21] Daily study group on creating custom user interfaces

87 Replies
Posted 4 years ago

Rohit, Thanks. Gerry

POSTED BY: Gerald Dorfman
Posted 4 years ago

I'd like to use Manipulate to show a dynamic control variable's name and value in a larger font size. The following code yields the name of the scoped variable for "a" rather than its value, for example "a = Dynamic[FE`a$$189]". How do I fix this code so that the value of the dynamic variable appears with font size 20?

Manipulate[
 Grid[{{Style["a = " <> ToString[Dynamic[a]], 20]}, {ContourPlot3D[
     x^2 + y^2 + a z^3 == 1, {x, -2, 2}, {y, -2, 2}, {z, -2, 2}, 
     Mesh -> None, ImageSize -> Medium]}}], {a, -2, 2}]
POSTED BY: Gerald Dorfman
Posted 4 years ago

Hi Gerald,

You were close.

Manipulate[
 Grid[
  {{Style["a = " <> ToString@a, 20]},
   {ContourPlot3D[x^2 + y^2 + a z^3 == 1, {x, -2, 2}, {y, -2, 2}, {z, -2, 2}, 
     Mesh -> None, 
     ImageSize -> Medium]}
   }],
 {{a, -2, Style["a", 16]}, -2, 2}]

Also increased the size of the label for the control.

POSTED BY: Rohit Namjoshi

Thank you so much, Jayanta.

Pål

POSTED BY: Pål Lillevold

John again,

No need to answer. On viewing the last session recording I learned callKernel is a dummy variable.

Thanks for the very useful / helpful course materials.

POSTED BY: John Burgers

I'm having trouble finding further information on the use of "callKernel" in the Wolfram documentation. I'm hoping someone can direct me to further my understanding or provide an explanation so that I understand more how it functions in examples such as in Session 13 Tip and Tricks for Effective UI design example of a Button disabled until computation finishes ...

DynamicModule[{enabled = True},
 Button["Print",
  enabled = False;
  Pause[2]; Print[TimeObject[]];
  enabled = True;
  ,
  Method -> "Queued",
  Enabled -> Dynamic[callKernel; enabled]
  ]
 ]
POSTED BY: John Burgers

TimeConstrained seems not to work when implemented in the Button functionality.

  • Correctly understood?
  • Is there a work around?

Thank you in advance and best regards Pål L

POSTED BY: Pål Lillevold
POSTED BY: Jayanta Phadikar

Thank you so much, Vincent!

POSTED BY: Pål Lillevold
Posted 4 years ago
POSTED BY: Tom Blanton

Yes, for me it was a very strong course as well.Thanks to all people who made this experience possible!

POSTED BY: Andreas Rudolph
POSTED BY: vincent feng
Posted 4 years ago

Is there a way to verify that my quiz results have been recorded?

POSTED BY: Tom Blanton
POSTED BY: vincent feng

Hi Tom,

As long as you see a passing score after hitting "Get Results", your score has been sent to a Databin for review by the Wolfram U team. Quiz scores will be reviewed the week of Oct. 4th and certificates sent shortly thereafter. If you do not receive your certificate, please send an email to wolfram-u@wolfram.com, we can pull the data and double check at that time.

POSTED BY: Cassidy Hinkle

Was a recording made of today's (Fri, 24 Sep) presentation?

POSTED BY: Matthew Heaney
Posted 4 years ago

can somebody please confirm if recording was made?

POSTED BY: Doug Beveridge
POSTED BY: Cassidy Hinkle

Week 3 Recap, Live UI Development and Mini Projects Solutions is not available.

Posted 4 years ago
POSTED BY: Gerald Dorfman

We will be distributing the solutions to the projects in Session 14.

POSTED BY: Jayanta Phadikar
Posted 4 years ago

Hi Gerald,

I see a couple of typos. Dyanmic[input] should be Dynamic[input], and BaseStyle -> BackGround -> White should be BaseStyle -> Background -> White

POSTED BY: Rohit Namjoshi

Attendees in the daily study group had asked about the palette used to delete outputs during presentation. DeleteAllOutputPalette is now present in the Wolfram Function Repository. https://resources.wolframcloud.com/FunctionRepository/resources/DeleteAllOutputPalette/

POSTED BY: Kunal Khadke
Posted 4 years ago

PaneSelector evaluates its arguments before the selector is rendered, they are not re-evaluated when a selection is made. e.g. the random values do not change

DynamicModule[{x = 1}, 
 Column[{SetterBar[Dynamic[x], {"Don't press this", 1, 2, 100, "Hi there"}], 
   PaneSelector[{"Don't press this" -> "I said DONT PRESS !!!", 
     1 -> RandomInteger[10], 2 -> RandomReal[], 100 -> "You Pressed One Hundred", 
     "Hi there" -> "What is your name ?"}, Dynamic[x]]}]]
POSTED BY: Rohit Namjoshi

Use the second argument of Dynamic:

DynamicModule[{x = 1},
 Column[
  {
   SetterBar[
    Dynamic[x, 
     If[# == "Don't press this", Speak["I said DONT PRESS !!!"]; 
       x = #, x = #] &],
    {"Don't press this", 1, 2, 100, "Hi there"}],
   PaneSelector[
    {"Don't press this" -> "", 1 -> "One", 2 -> "Two", 
     100 -> "You Pressed One Hundred", 
     "Hi there" -> "What is your name ?"}, Dynamic[x]
    ]
   }
  ]
 ]
POSTED BY: Jayanta Phadikar

Question: Today you pointed out that ImageSize -> Automatic helps speed up slow interfaces. Could you please explain why?

POSTED BY: Zbigniew Kabala

Wrapping the contents with Dynamic and setting ImageSize->Automatic make the contents evaluate only when the particular tabs are clicked. Without these settings, TabView or PaneSelector evaluates all the contents before displaying. Thus the settings help in reducing the initial loading time.

Some more details can be found here: tutorial/Views#23068646

POSTED BY: Jayanta Phadikar
POSTED BY: Jayanta Phadikar
Posted 4 years ago
POSTED BY: Tom Blanton
Posted 4 years ago
POSTED BY: Tom Blanton

Yes DynamicModule is in general supported in the Wolfram Player. Please see the difference between the Free Player and the Player Pro/Enterprise CDF though, for a comparison of all the supported features.

We will discuss encoding of packages, making the functions ReadProtected etc. for securing the code in Session 10 - Deployment. If your interface is small enough, you could deploy the interface and need not keep code in any separate package. Once again, more about deployment practices are coming in Session 10.

POSTED BY: Jayanta Phadikar
Posted 4 years ago

Hi Pål,

Something like this?

{x = c; PopupMenu[Dynamic[x], {a, b, c, d}], Dynamic[x]}
POSTED BY: Rohit Namjoshi

How to control the display of an initial value in PopupMenu? Thank you in advance!

POSTED BY: Pål Lillevold
Posted 4 years ago
POSTED BY: Doug Beveridge

After you downloaded/unpacked the course material you find it as "OutputDeleteUtility.wl" in folder "Supporting Files"

POSTED BY: Andreas Rudolph
Posted 4 years ago
POSTED BY: jeremy kirton
Posted 4 years ago

Maybe try this

y = 1;
DynamicModule[{},
 Dynamic[x],
 Initialization :> (x := 3*y)]
POSTED BY: Updating Name
Posted 4 years ago
POSTED BY: Gerrie Shults
POSTED BY: Jayanta Phadikar
POSTED BY: John Burgers

Yes, it is possible by using the third argument of Overlay.

Here is an example from the documentation (ref/Overlay#53834658):

Overlay[{Slider2D[], Graphics[{Opacity[.2], Disk[]}]}, All, 1]
POSTED BY: Jayanta Phadikar
POSTED BY: John Burgers

Yes it seems that the controls from only one layer can be activated. You can however use Row/Column/Grid in that layer for keeping multiple controls.

POSTED BY: Jayanta Phadikar

Where should I put the Dynamic to control the appearence or not of the frame in this toy manipulate example:

Manipulate[
 x,
 {x, 0, 1},
 {{frmd, False}, {True, False}},
 Paneled -> frmd
 ]
POSTED BY: Jayanta Phadikar

Jayanta, thank you very much for the instructive reply.

Posted 4 years ago

It would be better if you did NOT begin the session with some survey question that blocks the session from opening up on my computer. I am working on the computer while waiting for the session to begin and depending on the sound of the audio to let me know when the session has begun. That is the whole point of signing in early, and the survey question defeats that purpose.

POSTED BY: Raymond Low

Hi Raymond,

Sorry to hear you faced some issues with the webinar session today. We do use poll questions to allow our attendees to interactively respond during the study group. But they should not interfere with the webinar itself in anyway or prevent it from starting up. If you run into the issue again, please email us at wolfram-u@wolfram.com and we can try to troubleshoot it.

POSTED BY: Charles Glover
Posted 4 years ago

Hi Charles,

I think what you are looking for is an undocumented function MakeBilateral from the AuthorTools package. Check this thread on MSE.

One of the comments in that thread

MakeBilateral is to make documents or parts of documents like the style of Wolfram's old printed "The Mathematica Book", with explanatory text alongside Input/Output cell pairs

POSTED BY: Rohit Namjoshi

Thanks - I'll check it out

POSTED BY: Charles Glover
Posted 4 years ago
POSTED BY: Rohit Namjoshi

Dear Friends, how can I obtain the same type of sliders and light gray color in the final graphic if I'm using the same code? Do I need to change some initial setting?

Many thanks.

Attachment

Attachments:

Yes by default the appearances are OS dependent. We can set a generic appearance which should be independent of the OS:

Style[Slider[Dynamic[x]], ControlsRendering -> "Generic"]
POSTED BY: Jayanta Phadikar

Thank you for your reply. I think in the option inspector should be "somewhere" an option for the default FontSize to be set at 12 globally or for a notebook.

Posted 4 years ago
POSTED BY: Rohit Namjoshi
Posted 4 years ago
POSTED BY: Rohit Namjoshi
Posted 4 years ago
POSTED BY: Updating Name
POSTED BY: Jayanta Phadikar
Posted 4 years ago

Thank you, Jayanta. I appreciate the example. I'm still learning what I can do without customization, but when I'm finally building something, I may also want to customize.

POSTED BY: Gerrie Shults
Posted 4 years ago
POSTED BY: Rohit Namjoshi
Posted 4 years ago
POSTED BY: Gerrie Shults
Posted 4 years ago
POSTED BY: Gerrie Shults

Is it safe to try the quiz now? Is it grading correctly?

POSTED BY: James Choi

I am sorry, could someone post the link to the quiz? I can not find it on the group. Thank you and sorry for the added noise!

POSTED BY: Rui Alves
Posted 4 years ago

POSTED BY: Gerald Dorfman
Posted 4 years ago

It does not work because of a typo. Delimiter, not Delimeter.

POSTED BY: Rohit Namjoshi
POSTED BY: Jayanta Phadikar
Posted 4 years ago
POSTED BY: Avery Kramer

Thank you everyone for your enthusiastic participation in this week's sessions. I hope that you have been enjoying and finding the sessions helpful.

In this week, we covered some fundamental concepts of dynamics and Manipulate.

In the next week, we will discuss more about certain pragmatic concepts related to the development of User Interfaces and look at several User Interface examples.

Our apologies for few things here and there not working properly in the notebooks. We are making the corrections and will make an updated set of notebooks available to you at the end of the series.

POSTED BY: Jayanta Phadikar
Posted 4 years ago
POSTED BY: Gerrie Shults
Posted 4 years ago

Also, according to the Day 1 notebook, Introduction, slide 8, item 2 under Entirely cloud-based interfaces, the answer to question 3 is being graded incorrectly.

POSTED BY: Gerrie Shults

Any idea when the quiz is due? I don't see a due date listed in any of the materials. Thanks.

POSTED BY: Timothy Ewing
Posted 4 years ago
POSTED BY: Rohit Namjoshi

I have the same issue. In other study groups the due date came after the course was finished.So, it is probably not an issue in this regards.

POSTED BY: Andreas Rudolph

Hi Everyone,

Just wanted to confirm Quiz 1 should be working as expected. Our apologies for the issues you faced with the quiz last week.

Also we'd like to request that you not post the link to the quizzes here in the public forum. We've created the quizzes specifically for our study group attendees. But we are happy to discuss any questions you may have about the quizzes, here.

Thank you, Abrita

Posted 4 years ago

On slide 10 of today's presentation, Session 3 - Dynamic Fundamentals I, a correction was made to the following expression:

Control objects:

stop = 1;

Dynamic[
 If[stop == 0,
  Button[Style["Start", 20], Background -> LightGreen, ImageSize -> {80, 40}],
  Button[Style["Stop", 20], Background -> LightRed, ImageSize -> {80, 40}]]
 ]

To make it work as intended, stop==1 and stop==0 were inserted, but I haven't been able to make the correction properly. Could you please help?

POSTED BY: Tom Blanton
Dynamic[
 If[stop == 0,
  Button[Style["Start", 20], stop = 1, Background -> LightGreen, 
   ImageSize -> {80, 40}],
  Button[Style["Stop", 20], stop = 0, Background -> LightRed, 
   ImageSize -> {80, 40}]]
 ]
POSTED BY: Timothy Ewing
POSTED BY: Jayanta Phadikar

Looking for something like this?

Manipulate[
 Graphics[{
   LABColor[lightness, a, b],
   Opacity[opac],
   Disk[]}],
 {lightness, 0, 1}, {{a, 0}, -1, 1},
 {{b, 0}, -1, 1}, {{opac, 1}, 0, 1}]
POSTED BY: James Choi
POSTED BY: Peter Burbery
POSTED BY: Lou D'Andria
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard