Pen Control

Hi
I am trying to build a simple note app.
The first screen "Selection" has a gallery where all the drawings are shown.
When the user clicks on one it navigates to the second screen "Drawing" with a pen control.
When the user clicks the back button on the "Drawing" screen I use the onInvisible event to Collect(Collection1,Pen1!Image)
This collection is attached to the gallery as data source.
The gallery works good every time the user goes back a image is added.
But my question is now, when the user clicks on one Image element of the gallery the Pen Control should load the Image clicked.
I tried the onVisible event with Pen1!Image!Url = Gallery1!Selected!Image1!Image
It gets accepted without error but nothing happens. The Window Changes but the Pen1!Image is not changed.
And the other thing I would like to do is clearing the Pen1!Image when the user clicks a "New Drawing" button on the gallery screen.
Thank you in advance for your help

You need to collect the pen strokes. Assuming you need the images as well, you can use: Collect(Collection1, {I:Pen1!Image,S:Pen1!Strokes}) as the rule for your onInvisible property.
Set the Data>Image property of the image control to: ThisItem!I!Url. This will display the images as before.
Set the Behavior>OnSelect property of the image control to: UpdateContext({selectedItem:First(Gallery1!AllItems)!S!Url}); UpdateContext({selectedItem:ThisItem!S!Url}) -- this sets the context variable selectedItem to strokes for the current item. The
first UpdateContext rule is there to set a default, so the second one triggers the change.
Now, set the Data>DefaultStrokes property of the pen control to: selectedItem -- this will cause it to pick up the strokes for the item selected in the gallery.  
For clearing the pen, set the Behavior>OnSelect property of your "New Drawing" button to: UpdateContext({penClear:true});UpdateContext({penClear:false}). Set the  Data>Clear property of the pen control to: penClear.  
Thanks
Robin

Similar Messages

  • Question About the Pen Control in Project Siena

    Hi, good day.
    I'am working on some tech demos with Project Siena, and I need to use the pen control so that the user draw some lines in the main page of the app. I decided to hide the pen controls, so there's only a white canvas. Sometimes the user will need to erase
    some strokes... and because I hide the controls, I need a way to toggle between Draw Mode and Erase Mode.
    I added a Toggle Switch so that in the OnCheck method I could add this expression "PenMode!Draw" or "PenMode!Erase",
    but it doesn't help. I think I am using a wrong way. Are there any suggestions on how to switch between draw and erase mode within the pen control, without showing the controls?
    Also, is there any way to erase or reset ALL the strokes in the pen control? For example, drawing some lines inside the pen control, and that the user can clean all the strokes at once.
    Thanks,
    Antonio S.

    Antonio,
    It is possible to do both.  
    I have uploaded an example of this called Pen Control to the following:
    https://onedrive.live.com/#cid=5CEEF21796F5830D&id=5CEEF21796F5830D%218724
    For the Mode Toggle:
    Set the Mode (Design > More > Mode) to CTRLpen
    Create a Slider with the Min set to 0, and the Max set to 1.
    Set the Slider's On Change to the following:
    If(Slider1!Value = 0,UpdateContext({CTRLpen: PenMode!Draw}),UpdateContext({CTRLpen: PenMode!Erase}))
    For the Erase All
    Set the Pen's Clear to PenClear
    Create a button.
    Set the Button's On Select to the following:
    UpdateContext({PenClear: true}); UpdateContext({PenClear: false})
    Note:
    CTRLpen and PenClear are names I made up.  You can replace them with whatever names you want to use, as long as they are not names reserved by Siena.
    -Bruton

  • Pen Tilt for Size Dynamics - not working.

    I am using Photoshop CS and a Wacom Intuos3 with updated drivers.  (6.1.3-5)
    Using Photoshop's brush tool dynamics, I set Size Dynamics to pen tilt - not pressure - yet the pen's pressure still exclusively aff
    ects the brush size when drawing.
    I would like to have the tilt of the pen control the brush Size, much like using a blunt end of a pencil vs. the sharp tip.
    In a separate test, I set the brush Opacity dynamics to pen tilt, and it worked as expected: a near full opacity with a vertical pen
    , and almost no opacity with a highly tilted pen. Pressure had no effect, as specified. So, the tilt functionality of the pen defini
    tely works.
    How can I resolve this issue and get the Wacom pen's Tilt to affect Photoshop's Brush Size Dynamics?

    This is a known issue that has plagued PS for many interations. The team has to re-write the code and is not sure when the problem will be corrected so that it will be fully functional. Don't hold your breath for CS5.
    There is a really long thread on this.

  • Merge a photo and pen strokes into a single image

    Good day.
    I need to add a Camera and Pen control so that I take a picture, and then write with the pen above it. Is there any way to merge both photo and pen strokes into a single image, so I can stored them in a collection??
    Thanks,

    You cannot merge them into one physical image, but you can still store them in a collection for later display.  Collect them, just like you would anything else, just store the photo as one name, and the pen as another. 
    Where you want to display them, just use two image controls, directly above each other.  Set one to the photo, and one to the pen.
    -Bruton
    Thanks, I stored the photo url and strokes in the same collection, and then I did what you suggested: two image controles, one above the other. Thanks!
    Antonio S.

  • Locked Layers in CS3

    upon opening a jpeg and finding it locked I unlock by using new layer from background.  But even on this unlocked layer I can not use paint brush.  I can use the lasso and edit/fill but can't paint on the layer.  Nothing happens with the paintbrush.  Any suggestions would be greatly appreciated... thanks

    Background layers transparency is always locked because they do not support transparency. All pixels are 100% opaque.  If you can not paint on a background check the tools option bar make sure blending mode is normal and opacity and fill 100% foreground color is good and if you have a tablet the pen control icons are in a good state.

  • Windows 8 on X60/61 tablet

    I know this is old technology, but I've now been using Win 8 on this pen-only X60T for a few weeks and have most things working well, but would like to find other users to discuss how the combination works.
    My main interest is pro audio, and the operation of audio mixing and editing software. The interest in a tablet is for use with programs that have a multiplicity of virtual faders and control knobs. The single touch pen matches the mainly single touch graphics better than the multi-touch fat finger vagueness of the more modern machine that I tried briefly.
    The Windows 8 problems here revolve around the pen control of the pulling in of menus from the screen corners and sides. In either screen, pulling in the RH panel is very hit and miss. A flick in the corner usually brings in a "see-through" version of the panel, which often disappears before changing to the full panel. I have tried all sort of flicks and other gestures, but still haven't found the knack of this. Is there any way of making this reliable or adding a screen icon to bring up these controls?
    A similar situation exists with pulling down from the top LH corner to close programs that are no longer needed and the bottom LH corner to go to the metro screen.
    I've been playing with a program called Harrison Mixbus which, to keep the screens reaonably sensible without duplicate icons, requires several switches between metro and the proper screen on startup. This becomes an enormous chore unless I turn the tablet back into a laptop.
    I have tried a couple of  "bring the start button back" programs, but both of these had side-effects that I didn't like. 
    I am still researching getting rid of the screen/bezel gap that catches the pen at the screen side or corner. I am very surprised by the previous answer here saying the problem didn't exist on their X60. I have bought a job lot of bezels and all 3 of the ones that have the screen included have a similar gap. Some are a little smaller, though.

    I've tried Win 8 on my X41T and Fujitsu ST6012, all pen only tablets.
    My conclusion is that Windows 8, despite being a great OS for a touch-based tablet PC, isn't really engineered to work with pen tablets.(Especially, thinking how many older TPCs have extruded LCD Bezels, the charm bar is really difficult to use with these devices)
    It's mainly because how MS has decided to treat finger and pen differently-while touch is used for gestures and scrolls(which Windows 8 is all about), pen input is focused specifically for precision pointing and inking. This differential makes a tremendous synergy when using a device with at least a limited and primal touch support(like ThinkPad X201T)-you can touch and write in a very natural manner which you won't be able to get if they acted otherwise. However, since pen is pretty much no more than a supporting method in this configuration, using Windows 8 on pen only device is, to be frank, not much better, if not worse, than using it on Windows 7, except for some improvement in performance side.
    As such, my personal preferred OS for pen only devices is Windows 7. UIs are touch friendly just enough for tablet PCs, and has other great usability improvements over Windows XP TPC edition. And start button is so much helpful when using pen as the main pointing device.
    Kim
    W540( ), Helix(Sold), Tablet 2(Sold) Tablet 2( ), X120e(Sold), X201 Tablet, X41 Tablet(Sold), X41, X32*4, 701C*4

  • Contoso Site Survey

    Hi,
    I like the Contest Site Survey demo app so far. I am making revisions to it to fit my own services.
    What I would like to add on, though, is a way to export the collection at the end. What expression should I use to save Label9, the RecognizedText from Pen2? I would like to add this so I can reference it later.
    Brian
    Edit: I was not very clear in my original post:
    I am referring to this app:
    http://channel9.msdn.com/Blogs/Microsoft-Project-Siena/App-Tour-Contoso-Site-Survey
    It's purpose is to take a photo of a site, make markings on what services are needed, and to calculate (lookup) how many hours all the selected services would take.
    It does not save that information after all the work though. I am looking into using either SaveData or the Export button, but I am lost on how to get it to save the transcribed text from the Pen Input. All I seem to be successful in doing is saving the
    gallery collection information, which I already have available in my source spreadsheets.
    Is there a way to collect all the pen inputs into one save?

    Hi Brian,
    You can use the 'Export' control and assign the Data property to Gallery1!AllItems, assuming the name of your gallery is 'Gallery1'. This property will have the recognized text of the pen control for all the items that you take notes on and will be saved,
    when exported. Export control takes an array as input, so you will not be able to assign individual pen controls, unless you wrap the data in an array.
    Here are the steps:
    1. Add Export control.
    2. Click on 'Data' property and use Gallery1!AllItems (Gallery1 can be replaced with whatever the name of your gallery is).
    3. If you go to preview mode and click on the 'Export Data', pick a file from the file picker and the zip file will have the recognized text from the Pen.
    Thanks,

  • Iphone 8Gb-ver. Bluetooth chip.........

    what can we expect form the SDK does the bluetooth chip in the iphone have the ability to do more than sync to headset/ car hands free kits?
    Message was edited by: mcints77

    Based on the information publicly available about the SDK, people working with the SDK wouldn't be able to write additional Bluetooth profiles.
    No background processes, no changing OS components, and applications being sandboxed.
    However, the bluetooth chip itself is not the limitation. Bluetooth chips don't actually control what Bluetooth profiles are supported. They are just the medium. Does your ink pen control what language you write in? Sure, you can't do languages requiring a calligraphy style, but you can write multiple languages with a pen. Likewise Bluetooth is the means of transfer. Profiles determine the content.
    Profiles are software based. Some don't make sense other than for possibly novelty effect. For example using your iPhone as a mouse (HID profile).
    There have been no announcements about if Apple will be adding profiles. Any suggestion they would be adding them would be speculation.

  • When did Draw Arc .vi Change Format?

    In LabView 6.1, Draw Arc .vi had different wiring than in LabView 2010.  I ran into a problem with a VI that I was using as a small subVi that is part of a much bigger Vi and now won't work because the Draw Arc.vi has incorrect wiring.  The only difference I can see is that what is now a connection for "PEN" (cluster wire) was a connection for "black in B/W" (boolean wire).  Basically I had a green circle that slowly turned to black as seconds ticked down.  I have tried using the "PEN" control, entering "0" as pen color and line as "solid" but still does not work as before.  Any help would be much appreciated.  Thank You, Scott

    swins,
    hmm, sounds to me like it might not be the draw arc control. Are you sure that's the only one that could have broken in the upgrade? I dropped a simple little visual counter (just tied the arc size to the index of a for loop) into a sub vi as a test, and everything is working just fine for me. I'm interested to find out what's going on with your control that I can't replicate the issue. Maybe it's something specific with the color changing? 
    Cheers!
    TJ G

  • How do u modify polar plots

    I would like to modify/control as many features on a polar plot as possible. I am aware of the property node feature, but those seem to be limited in what can be modified. I would like to have control over plot line thickness, fill-in solid color under data, and text size. I have seen these things modified before but I can't figure it out myself. Has anyone had this same issue?
    Thanks!
    Solved!
    Go to Solution.

    robin533,
    It sounds like with as much customization as you want, you might have to dig deep in the code. I would suggest trying to get into the low level code of the Polar Plot VI and seeing if you can modify what it is you're looking for. You can access some pen controls and color options this way.
    Cheers!
    KyleP
    Applications Engineer
    National Instruments

  • Photoshop CC - Cannot control + click to select a different shape while using the pen tool?

    I used the pen tool constantly in photoshop cs6 and would often use control + left click to select a different shape while still using the pen tool.
    I'm now forced to switch to the move tool to select another layer? Why was this feature removed / changed?
    Fix: After fooling around more, here is how I fixed it:
    The new Direct Select Tool by default is set to "active" layers. Switch it to "all layers"
    Message was edited by: Joe Horan

    A new problem = Selecting multiple points with control + click + drag is selecting ALL shape layers... Jesus christ, why was this changed????
    I now have to double click the shape I want to select? Why? What is the point of this?

  • Controlling brush darkness with intuos5 pen pressure?

    I just bought a pressure sensitve tablet (wacom intuos5 medium).
    I want to set it up so I can practice "charcoal drawing" in photoshop without the mess. Specifically, I want the pressure to control the darkness of the brush tool, from very faint to completely black.
    So, in the brushes window, I enabled "other dynamics" and set the flow control to pen pressure. It works but not very well. It's hard to draw a faint line, and faint lines appear to be made up of discrete circles.
    I also try linking the opacity to the pen pressure, and set flow to 100%. This work better for faint lines, but I'm unable to draw a completely black line. It seems the opacity maxed out at about 40%. I don't want to apply too much pressure lest I break the tablet.
    Is there a better way to set this up?

    To avoid the visible circles you may have to reduce the Spacing (and subsequently maybe reduce the overall Flow).
    Could you post screenshots of your settings and the resulting strokes (ideally applied tio a Path with »Simulate Pressure« checked, so allow for comparrison)?

  • Pen-pressure control both opacity\flow AND size?

    I distinctly remember very early versions of Photoshop (even well before CS, perhaps) in which I could choose a brush that was very valueable to me and that would allow me to control with Wacom pen pressure both the opacity and the size of the stroke. I vaguely remember it had to do with the air-brush icon
    I can no longer find such a brush in photoshop.
    In all my attempts to play with the options or brush settings, or choosing the `pressure opacity icon` or the `size opacity icon` and all combinations I tried, I caouldn`t find a brush that will allow me to control both, and I remember and know that once it did exist...
    In screenshot 1 I show how when choosing opacity pressure control one gets these wonederful soft, cloudy, fluffy, gradient edges but how  even if the strokes seems to grow a bit thinner is actually the same width between the two parallel red lines.
    In screenshot 2 I show how when choosing size pressure control one ges these pointy sharp edges and not the cloudy gradients of the previous example
    In screenshot 3 I attemp[t a simulation - An artificial representation of the look and feel of that brush i`m referring to, long lost to me, that has both soft edges and can still be reduced to a thin line at the same time.

    Conroy, the point you bring up is important, thank you.
    The fade size and flow stroke would give the exact effect I`m looking for, if it could only be truly controled and did not impose a set and limited effect, in the sense that the stroke cannot be either lengthened, dragged,or modified in any way. It`s mere existence indicates that such an effect is still doable within the photoshop visual language.
    If only I could find how to be able to get such an effect for actual drawing...
    The loss of this ability spells a great handicap in my ability to use Photoshop.
    I think that all I needed in ancient versions was to click the airbrush icon and I would have it, but now clicking this icon seems strangely to yield no visible effect, which is also a tell-tail sign by itself, don`t you think?
    I wondoer whether other Wacom users are having the same problem and whether they are not too, suffering tremendously from the inexplicable dissapearance of that ability.
    I`m currently using a 12WX Cintiq Wacom tablet, always with the latest drivers.

  • Pen tool control points too small

    Is there any way to make it easier to select control points for the pen tool? It's really frustrating trying to edit paths since I keep missing the control point which deselects the whole path.
    Ideally I'd like to be able to increase the size of the control points themselves, but alternatively is there a 'snap to control point' option or something so I don't have to precisely click on a 1x1 pixel dot? It'd even be good if the size of the control points increase as I zoom in, but I can't see how to do that either. I'm using CS3.
    Thanks,
    Sam

    Sam,
    View>Smart Guides may be your friends: they tell you where you are.

  • Rotate 'pen tilt' brush control to compensate for new cs4 document rotate.

    Hey guys. Great new stuff in CS4.
    I have one little issue with the awesome new ability to rotate the document. It appears that the pen tilt is not also rotated to correspond to the rotated screen.
    I've a lot of brushes that use pen tilt to rotate the effect of a brush. The use of this effect varies, but there's usually a direct correlation to the position of the brush "ie" the brush is aligned parallel to the brush.
    It appears that when the document is rotated, the pen tilt is not then rotated inversely to compensate for the document rotation.
    Hence, If I've a brush that I use to draw ... let's say fence posts, and it's designed so that the fence posts are drawn facing perpendicular to the brush angle where when the wacom pen is oriented with it's tip pointing due left, the fence posts will be drawn vertically.
    Still with me?
    * Pen facing left, fence posts vertical.
    If you then rotate the screen 90* Clockwise, the posts will now be drawn parallel to the pen orientation.
    Ideally, the tilt would compensate for the screen rotation so that the brushes would maintain consistent interpretation to the pen tilt.
    That wasn't the most articulate thing I've ever written, but I hope you were able to understand my point.
    Thanks so much.
    -Rory-

    I work on Photoshop C4 with an Intuous 3 tablet as well as a Wacom tablet built into the body of my Lenovo laptop.  The tilt function doesn't seem to work on either tablet.  Just to be clear, I'm trying to control the angle jitter according to the angle that my pen is held.  I set the Shape Dynamic to Pen Title and the Angle Jitter to 0% and the little example, which shows what the brush should look, represents exactly what I would like for the pen to do.   But, no matter what angle I hold the pen, I get the same brush shape.  And that brush shape is the same as setting no Angle Jitter at all.  Is there any fix yet?

Maybe you are looking for

  • How to remove a dispatcher with a specific index (conf_indx)

    Hi, A few details: We are on 11.2.0.3 linux 64bit. We use both dedicated and shared connection. We have many environments (an environment consists of many schemas) in a single DB. For each environment we create at least one service (we know # of serv

  • Reg: Parameters to add SAP Standard REport

    HI all, I want to add extra parameters to sap standard report. how to add it. regards JK rao

  • How to use inputListOfValues in Jdeveloper (version: Jdeveloper drop3c2)

    I'm trying to use "inputListOfValues" with "queryCriteria" in Jdevloper drop3c2. When i ran the page (i used IE) and clicked the icon (to popup lov), its not responding. I suppose there is a problem with "inputListOfValues" component. Pls help me reg

  • Write statement after ALV

    Hello, I have a requirement where I am displaying the ALV using grid. Have a button on top. After ALV display, I select the row and press the button. The processing takes place like (Delivery creation). After this delivery creation, I have to display

  • FTP rename?

    Is it possible to issue a ftp rename command after the ftp put command when using ftp protocol to send files using X12 over Generic Exchange? Van I am communicating with requires this action to process edi file. Just wondering if there is a way to ad