Thread Tools Display Modes
02-17-15, 04:08 PM   #1
Benalish
A Flamescale Wyrmkin
 
Benalish's Avatar
Join Date: Dec 2012
Posts: 123
[SOLVED] OnKeyUp not working

On this editbox does not work the event OnKeyUp: there is something wrong?

Code:
<Frame name="testChooseDialog" parent="UIParent" toplevel="true" enableMouse="true" enableKeyboard="true">
	<Size>
		<AbsDimension x="450" y="141"/>
	</Size>
	<Anchors>
		<Anchor point="CENTER">
			<Offset x="44" y="60"/>
		</Anchor>
	</Anchors>
	<Backdrop bgFile="Interface\DialogFrame\UI-DialogBox-Background" edgeFile="Interface\DialogFrame\UI-DialogBox-Border" tile="true">
		<BackgroundInsets>
			<AbsInset left="11" right="12" top="12" bottom="11"/>
		</BackgroundInsets>
		<TileSize>
			<AbsValue val="32"/>
		</TileSize>
		<EdgeSize>
			<AbsValue val="32"/>
		</EdgeSize>
	</Backdrop>
	<Frames>
		<EditBox name="$parentEditBox" parentKey="editbox" inherits="InputBoxTemplate" enableKeyboard="true">
			<Size>
				<AbsDimension x="410" y="27"/>
			</Size>
			<Anchors>
				<Anchor point="TOPLEFT">
					<Offset x="23" y="-70"/>
				</Anchor>
			</Anchors>
			<Scripts>
				<OnKeyUp>
					print("OnKeyUp fired!")					
				</OnKeyUp>
			</Scripts>
		</EditBox>		
		<Button name="$parentButton2" inherits="UIPanelButtonTemplate" text="Esc">
			<Size>
				<AbsDimension x="75" y="23"/>
			</Size>
			<Anchors>
				<Anchor point="TOPLEFT">
					<Offset x="360" y="-101"/>
				</Anchor>
			</Anchors>
			<Scripts>
				<OnClick>
					self:GetParent():Hide(); 
				</OnClick>
			</Scripts>
		</Button>
	</Frames>
</Frame>

Last edited by Benalish : 02-17-15 at 07:46 PM.
  Reply With Quote
02-17-15, 04:36 PM   #2
Resike
A Pyroguard Emberseer
AddOn Author - Click to view addons
Join Date: Mar 2010
Posts: 1,290
You could just use the OnTextChanged script.
  Reply With Quote
02-17-15, 05:15 PM   #3
Duugu
Premium Member
 
Duugu's Avatar
AddOn Author - Click to view addons
Join Date: Nov 2006
Posts: 851
"Run when a keyboard key is released if the frame is keyboard enabled. Does not run for focused EditBoxes."

http://wowprogramming.com/docs/scripts/OnKeyUp
  Reply With Quote
02-17-15, 07:49 PM   #4
Benalish
A Flamescale Wyrmkin
 
Benalish's Avatar
Join Date: Dec 2012
Posts: 123
OnTextChanged event just does what I want. You cant add [SOLVED] to the thread's title.
  Reply With Quote

WoWInterface » Developer Discussions » Lua/XML Help » OnKeyUp not working

Thread Tools
Display Modes

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