dotnet combobox event....

Become a member of the CGSociety

Connect, Share, and Learn with our Large Growing CG Art Community. It's Free!

THREAD CLOSED
 
Thread Tools Search this Thread Display Modes
  02 February 2013
Smile dotnet combobox event....

Hey all ...greeting

I want to ask is there any event that trigered by pressing tab or enter on keyboard in dotNet Combobox....like when I writte something on blank combobox part and I press enter it'll print out those word.....I know some lost focus or got focus can [found at msdn] do that ...but it trouble me when I press tab and then move my mouse it'll triger the action twice...1 for tab and 1 for mouse move.. here is and example i want to create....



fn collectObj=
(
	obj=#()
	for i in objects where findItem obj i.name == 0 do append obj i.name
	obj
)

collectObj()
rollout hallo "ComboBox" width:201 height:31
(
	dotNetControl cbbox "ComboBox" pos:[0,1] width:148 height:21 
	
	on hallo open do 
	(
		theItem=collectObj()
		cbbox.items.clear()
		
		cbbox.items.addrange theItem
	)
	
	on cbbox keyboar enter or keyboardTab enter do --- is there any such as event in combobox like that (keyboard enter or keyboard tab do ?)
	(
		theText = cbbox.text
		print theText
	)
)

createDialog hallo



thanks for attention and reply.
 
  02 February 2013
use the KeyDown event and check argument's code for Enter or Tab
 
  02 February 2013
thanks for reply
before im not mention this ...but ive try this ...but seem no working could you parse where to make it work

on cbbox KeyDown arg do
	(
		if arg.keyCode== (dotNetClass "System.Windows.Forms.Keys").Enter do print "enter press"
	)

--->not working


but this working...



	on cbbox KeyUp arg do
	(
		if arg.keyCode== (dotNetClass "System.Windows.Forms.Keys").Enter do print "enter press"

	)


what happen ? just slightly keyup and down....is that different in code

Last edited by fajar : 02 February 2013 at 04:24 AM.
 
  02 February 2013
Thread automatically closed

This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.
__________________
CGTalk Policy/Legalities
Note that as CGTalk Members, you agree to the terms and conditions of using this website.
 
Thread Closed share thread



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
CGSociety
Society of Digital Artists
www.cgsociety.org

Powered by vBulletin
Copyright 2000 - 2006,
Jelsoft Enterprises Ltd.
Minimize Ads
Forum Jump
Miscellaneous

All times are GMT. The time now is 01:28 PM.


Powered by vBulletin
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.