dotnet combobox event....

Become a member of the CGSociety

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

Thread Tools 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 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=
	for i in objects where findItem obj == 0 do append obj

rollout hallo "ComboBox" width:201 height:31
	dotNetControl cbbox "ComboBox" pos:[0,1] width:148 height:21 
	on hallo open do 
		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 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
Society of Digital Artists

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

All times are GMT. The time now is 02:42 AM.

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