EQ2Interface.com
Search Downloads


Go Back   EQ2Interface > Developer Discussion > XML Modification Help & Info

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Unread 06-14-2007, 05:31 AM
dping28 dping28 is offline
A Grove Wisp
Interface Author - Click to view interfaces
 
Join Date: Feb 2005
Server: Antonia Bayle
Posts: 26
Default Need a little help with Startbutton mod

Hello,
had a quick question for you guys, basicly this mod is my first custom ui I have done other than installing others work. what I did was I took the startbutton xml (couldnt get my own new window to work) and I added 2 checkboxes, 2 text boxes, and 2 buttons. Its function is very simple.

Check1 Textbox1 and Button1 were all labeled MA (Main Assist) the next set labeled MT (Main Tank) I type in the names of the people check the box and it locks the box from being editable. I click the button and it issues /target (name in textbox) .

Everything works great except for one small detail. If I have the text box focused the only way I can get it unfocused is to hit enter which then makes my cursor go to a chat box and have to hit enter again. OR I just click the checkbox. Now this isnt a show stopper for me but was wondering if someone could tell me if there is a way to add something to it so I click with my mouse ANYWHERE outside of the tezt boxes they loose focus. Thanks!

-Lycaon
Reply With Quote
  #2  
Unread 06-14-2007, 08:14 AM
Landiin Landiin is offline
Slayer of clock cycles
This person is a EQ2Map developer.
Featured
 
Join Date: Nov 2004
Server: Oasis
Posts: 3,464
Default

I had something similar to this happen with a dropdown. What I did to keep the drop down from grabbing focus ever time the user would hit the space bar was to put the drop down in its own page and on the page I added the following code.

Code:
OnHoverIn="dorpdown.Enabled=True"
OnHoverOut="dropdown.Enabled=False"
You can not add this code to the Object in question because once you !Enable it it will no longer fire it's events.

It may or may not work with a text box, I've never tried with a textbox object.
__________________
Landiin's EQ2MAP Updater Discussion Download
Reply With Quote
  #3  
Unread 06-14-2007, 10:41 PM
dping28 dping28 is offline
A Grove Wisp
Interface Author - Click to view interfaces
 
Join Date: Feb 2005
Server: Antonia Bayle
Posts: 26
Default

Thanks for the reply! I will give that a shot and see if it works. Now that I think of it I think it will, cause I remember with eq2maps if i dont have the mouse over it i cant type.
Reply With Quote
  #4  
Unread 06-14-2007, 11:30 PM
Othesus's Avatar
Othesus Othesus is offline
A Griffon
This person is a EQ2Map developer.
Interface Author - Click to view interfaces
 
Join Date: Mar 2005
Server: Lucan DLere
Posts: 847
Default

There are a couple ways to force textboxes and dropdowns to lose focus, since they like to hold onto it when you don't want them to.

Exactly when are they taking focus or holding onto focus when they shouldn't? Just after you press enter? Or, after you click the checkbox?

It sounds like they are normally disabled, so they wouldn't steal focus then. I do something similar in my browser window. There's an invisible button directly behind the textbox. When you click on the button it enables the the textbox and the textbox is disabled as soon as you move your mouse off of it.
Reply With Quote
  #5  
Unread 06-15-2007, 03:16 AM
dping28 dping28 is offline
A Grove Wisp
Interface Author - Click to view interfaces
 
Join Date: Feb 2005
Server: Antonia Bayle
Posts: 26
Default

well the problem is the text box doesnt loose focus after i click in it to type.. The checkbox was my way of getting around it by making the textbox uneditable. I would click in it and have the cursor but when ever I click anywhere else it wouldnt give up focus. I could do the checkbox like i mentioned or hit enter twice cause the first enter takes focus to the chat box. Id like to just be able to click anywhere on the screen and it loose focus. But will try the onhover bit and see if that works.
Reply With Quote
  #6  
Unread 06-15-2007, 02:15 PM
Othesus's Avatar
Othesus Othesus is offline
A Griffon
This person is a EQ2Map developer.
Interface Author - Click to view interfaces
 
Join Date: Mar 2005
Server: Lucan DLere
Posts: 847
Default

Ok, there are a few ways of working around this. If any button has the property IsDefaultButton="true" that button will trigger when you press Enter. So, you may be able to use a hidden button that disables your textbox as soon as you press Enter. The property IsCancelButton="true" makes that button trigger when you press Esc.

Sometimes you have to force focus to some other window. I've followed Zonx's recommendation and forced it to the player window (which doesn't have any text box or dropdown to grab focus) with the script "set_focus Parent.Parent.Parent.Player.FullPath" or something similar.
Reply With Quote
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -5. The time now is 10:34 AM.


Our Network
EQInterface | EQ2Interface | WoWInterface | LoTROInterface | ESOUI | MMOUI