Thread Rating:
  • 288 Vote(s) - 2.84 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Dialog and moving focus
01-12-2012, 07:59 PM,
#2
RE: Dialog and moving focus
Could you put your screen layout into a View ? If you could, then calling View.show before {f.request-key-focus} will do what you want .

But if you have to put your screen layout within a AppletView(such as within the browser), I don't know how to do this .
Code:
{def f = {TextField}}
{def v =
    {View
        {spaced-vbox
            f,
            {CommandButton
                label="Show dialog",
                {on Action do
                    {dlg.show center?=false, title="Focus Test", modal?=false }
                }
            }
        },
    {on WindowClose do
      {exit 0}
    }
    }
}
{def dlg = {Dialog
               {CommandButton
                   label="Move to focus",
                   {on Action do
                       {after 0s do
                           {v.show}
                           {f.request-key-focus}
                       }
                   }
               }
           }
}

{v.show}

Reply


Messages In This Thread
Dialog and moving focus - by alchimiste - 01-04-2012, 10:24 AM
RE: Dialog and moving focus - by heavybugtracker - 01-12-2012, 07:59 PM

Possibly Related Threads...
Thread Author Replies Views Last Post
Question 'Find' dialog custom NEOGURi 1 2,628 08-20-2014, 05:47 PM
Last Post: dyoshida
Forum Jump:


Users browsing this thread:
1 Guest(s)