Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/ubercode/public_html/forum/includes/functions_content.php on line 661

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/ubercode/public_html/forum/includes/functions_content.php on line 661

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/ubercode/public_html/forum/includes/functions_content.php on line 661

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/ubercode/public_html/forum/includes/functions_content.php on line 661
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 3729: Cannot modify header information - headers already sent by (output started at /includes/functions_content.php:661)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 3731: Cannot modify header information - headers already sent by (output started at /includes/functions_content.php:661)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 3732: Cannot modify header information - headers already sent by (output started at /includes/functions_content.php:661)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 3733: Cannot modify header information - headers already sent by (output started at /includes/functions_content.php:661)
ubercode.com • View topic - Setting the cursor to an edit object

Setting the cursor to an edit object

Make suggestions of things to add or change in Ubercode.

Setting the cursor to an edit object

Postby agritron on Sun Jan 18, 2009 3:49 am

How do you tell the cursor to locate its self inside an edit object when it is opened?
I want to enable and open an edit window ( I know how to do this) and have the cursor inside the edit box blinking as if the mouse had been clicked in the edit box area .
I want my user to be able to start typing when the box is enabled with out mouse clicking in the box.
Thanks to anyone that can answer this.

Terry
agritron
Lurker
 
Posts: 76
Joined: Mon Jan 05, 2009 1:39 am

Re: Setting the cursor to an edit object

Postby ubercode on Mon Jan 19, 2009 6:18 pm

You can use SetSelection(me.Edit1, ...) to define where the cursor is placed in the edit control. If you want the edit control to automatically have the focus when the window is loaded, try and have the edit control as the first control in the window (eg added first, and near the top).

If you need to set the focus on an edit control partway through a window I need to investigate more :)
ubercode
Site Owner
 
Posts: 275
Joined: Sun Jan 04, 2009 3:46 pm
Location: UK Channel Islands

Re: Setting the cursor to an edit object

Postby agritron on Thu Jan 22, 2009 8:46 pm

I tried that and I put it in the Load Event section. The box is highlighted but you still have to mouse click in the box to start typing. I would like to have the new dialog open and if you start typing it would start entering text in the box I have selected.

Terry
agritron
Lurker
 
Posts: 76
Joined: Mon Jan 05, 2009 1:39 am

Re: Setting the cursor to an edit object

Postby ubercode on Fri Jan 23, 2009 6:53 pm

OK so setting the selection doesn't set the focus...

Can you try making the edit control the first control in the window? You may need to open the RC file as text to do this.
ubercode
Site Owner
 
Posts: 275
Joined: Sun Jan 04, 2009 3:46 pm
Location: UK Channel Islands

Re: Setting the cursor to an edit object

Postby onykage on Tue Jan 11, 2011 7:05 pm

ok so what if this edit is tied to a dialog that is already loaded and cannot be unloaded, its just hidden and then shown when needed. The rc file has already been parsed out when the dialog was loaded. I recommend some kind of setFocus() function.
onykage
Admin
 
Posts: 221
Joined: Sat Jan 03, 2009 8:28 pm
Location: Armpit USA
Programming languages: php, java, python, ubercode, easyuo, peril, cobal, pascal, ruby


Return to Language Suggestions

Who is online

Users browsing this forum: No registered users and 1 guest

cron