sketchucation logo sketchucation
    • Login
    πŸ›£οΈ Road Profile Builder | Generate roads, curbs and pavements easily Download

    Shift WebDialog Focus to SU?

    scheduled pinned locked moved Developers' Forum
    11 Posts 4 Posters 764 Views 4 Watching
    loading-more-posts
    • oldest-to-newest
    • newest-to-oldest
    • most-votes
    reply
    • reply-as-topic
    guest-login-reply
    deleted-message
    • J Offline
      Jim
      last edited by

      How would I make a WebDialog change the focus to the main SU window after a user clicks on something in the dialog?

      Hi

      one-reply-to-this-post last-reply-time reply quote 0
      • thomthomT Offline
        thomthom
        last edited by

        hmm... A Win32 API call on the PC maybe? Then, something else on the Mac..?

        Thomas Thomassen β€” SketchUp Monkey & Coding addict
        List of my plugins and link to the CookieWare fund

        one-reply-to-this-post last-reply-time reply quote 0
        • AdamBA Offline
          AdamB
          last edited by

          Would closing the dialog work to transfer focus to the parent (SU) window?

          Developer of LightUp Click for website

          one-reply-to-this-post last-reply-time reply quote 0
          • J Offline
            Jim
            last edited by

            Yeah, that's what I thought. Thanks guys.

            Hi

            one-reply-to-this-post last-reply-time reply quote 0
            • J Offline
              Jim
              last edited by

              EDIT: Maybe it's not important... If I select a Tool in the Dialog, move to the SU drawing area - even if the dialog still has focus, the selected tool still appears to be active using inferencing et.al.

              Hi

              one-reply-to-this-post last-reply-time reply quote 0
              • thomthomT Offline
                thomthom
                last edited by

                Don't think you can control the focus of anything outside the HTML page from JavaScript.

                Thomas Thomassen β€” SketchUp Monkey & Coding addict
                List of my plugins and link to the CookieWare fund

                one-reply-to-this-post last-reply-time reply quote 0
                • TIGT Offline
                  TIG Moderator
                  last edited by

                  Something like

                  onfocus="this.blur()"
                  

                  ?

                  TIG

                  one-reply-to-this-post last-reply-time reply quote 0
                  • AdamBA Offline
                    AdamB
                    last edited by

                    And rightly so. Its a basic tenet of UI design that users choose where to focus.

                    And I guess a corollary of that is you might ask yourself if this is the best approach.. ie don't let it become of feat of engineering and lose sight whether its such a hot idea to be pinging the focus automagically around..

                    Adam

                    Developer of LightUp Click for website

                    one-reply-to-this-post last-reply-time reply quote 0
                    • thomthomT Offline
                      thomthom
                      last edited by

                      @adamb said:

                      And rightly so. Its a basic tenet of UI design that users choose where to focus.

                      And I guess a corollary of that is you might ask yourself if this is the best approach.. ie don't let it become of feat of engineering and lose sight whether its such a hot idea to be pinging the focus automagically around..

                      Adam

                      Such as SU bouncing focus back to toolwindows when you undo operations..? grumble

                      Thomas Thomassen β€” SketchUp Monkey & Coding addict
                      List of my plugins and link to the CookieWare fund

                      one-reply-to-this-post last-reply-time reply quote 0
                      • AdamBA Offline
                        AdamB
                        last edited by

                        @thomthom said:

                        Such as SU bouncing focus back to toolwindows when you undo operations..? grumble

                        But thats correct behavior if I unwind an operation to just before the Tool was used..No?

                        Just becomes others are inconsistent doesn't mean you have to stoop to that too! You're better than that.. πŸ˜„

                        Adam

                        Developer of LightUp Click for website

                        one-reply-to-this-post last-reply-time reply quote 0
                        • thomthomT Offline
                          thomthom
                          last edited by

                          @adamb said:

                          But thats correct behavior if I unwind an operation to just before the Tool was used..No?

                          Nah. Not IMO. I find it very annoying. I want to keep the focus on the viewport.

                          Thomas Thomassen β€” SketchUp Monkey & Coding addict
                          List of my plugins and link to the CookieWare fund

                          one-reply-to-this-post last-reply-time reply quote 0
                          • 1 / 1
                          • first-post
                            last-post
                          Buy SketchPlus
                          Buy SUbD
                          Buy WrapR
                          Buy eBook
                          Buy Modelur
                          Buy Vertex Tools
                          Buy SketchCuisine
                          Buy FormFonts

                          Advertisement