Jump to content


Photo

TNextInpector EventHandling Each Object

TNextInspector EventHandling berg

  • Please log in to reply
3 replies to this topic

#1 Orpheus87

Orpheus87
  • Members
  • 11 posts
  • Gender:Male

Posted 16 September 2015 - 01:00 PM

Dear Mr Boki,

 

Sorry for my bad english.

I was wonder how can we set event on each object on TNextInspector?

For example:

1. I added 2 NxTextItem (NxTextItem1 & NxTextItem2) and 1 NxComboItem (NxComboItem1).

When user edit NxTextItem1, I dont want any space character on NxTextItem1 tough I allow space character  on NxTextItem2.

2. When user change value of NxComboItem1, I want to change value on NxTextItem2 immediatly tough user doesnt press 'ENTER' on NxComboItem1.

 

How can we do that?

Many Thanks before!

 

 

Regards,

 

Orps



#2 Boki (Berg)

Boki (Berg)

    Boki (Berg)

  • Forum Admin
  • PipPipPipPipPip
  • 8,191 posts
  • Gender:Male

Posted 16 September 2015 - 03:51 PM

Hello Orps,

 

If you added items in design-time you can access to their names (e.g. TNxTextItem1) and change properties as usual.

 

If item is in edit mode, you can check Editor property of Item. This property points to TNxCustomEdit and you can read and change text there.

 

I hope that this is good for start.


boki@bergsoft.net | LinkedIn Profile
--
BergSoft Home Page: www.bergsoft.net
Users Section: users.bergsoft.net
Articles and Tutorials: help.bergsoft.net (Developers Network)
--
BergSoft Facebook page
--
Send us applications made with our components and we will submit them on: www.bergsoft.net/apps.htm. Link to this page will be also set on home page too.

#3 Orpheus87

Orpheus87
  • Members
  • 11 posts
  • Gender:Male

Posted 17 September 2015 - 06:10 AM

Dear  Mr Boki,

 

Thank you for your support. But I still dont understand.

Theres is no other Event when I click nxTextItem on NextInspector but only OnDrawPreview. Is there something wrong or I must do something else?

Maybe I can send you screen shot on my application?

Thank you

 

 

Regards,

 

Orps



#4 Orpheus87

Orpheus87
  • Members
  • 11 posts
  • Gender:Male

Posted 17 September 2015 - 07:37 AM

Dear Mr Boki,

 

Finally I found solution for my case.

What i do is:

1. Make some variable (in my case i use string)

2. On event "OnSelectItem" TNextInspector, I put my new variable as a sign to which object is active

3. On event "OnKeyPressed" TNextInspector, I set condition based on value my new variable

4. Done

 

Thank you so much, Mr Boki.

 

Regards,

 

Orps







Also tagged with one or more of these keywords: TNextInspector, EventHandling, berg

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users