Page 1 of 1

nbInterface # 8

PostPosted: Wed Aug 25, 2010 11:17 pm
by David de Argentina
Hi Dave,

I'm doing a plugin that simulates a ComboBox Object with key by key search feature.

You can see the sample at:

In fact, all works fine.

I'm trying to build the definitive plugin, and I think there is better idea than User sends to plugin the Rectangle Object name, User sends to the plugin the InputBox Object name.

Using the InputBox Object metrics (the only reason to use the InputBox Object is get the metrics), it is easy for me create a rectangle according the place and size of the InputBox Object.

When I build the nbEditAction dialog, I tryed to get the InputBox Object name using the nbInterface #8 function, but only displays Rectangle names.

Are there any way to get the InputBox Object name via SDK ?

Thanks in advance,
David de Argentina

PostPosted: Wed Aug 25, 2010 11:57 pm
by HPW
Modified sample from the SDK help:

Code: Select all
FUNCTION nbInterface( InterfaceID : INTEGER; VAR Data : PCHAR ) : BOOLEAN;

InterfaceID may be one of the following integer values:

ID Description

1 Display the Object Selector dialog.

Beginning with NeoBook 5.6, you can limit the types of objects you want to appear in the Object Selector by initializing the value of Data with the following:


Replace # above with one of the following numbers:

1 Article
2 Push Button
3 Picture
4 Rectangle
5 Ellipse
6 Line
7 Simple Text
8 Text Entry Field
9 List Box
10 Combo Box
11 Check Box
12 Radio Button
13 Web Browser
14 Timer
15 Track Bar
16 Round Rectangle
17 Media Player
18 Animated GIF
19 Group
20 Container
21 Flash Player
22 Polygon
23 Linked Article
For example, the following will display only Text Entry Field objects:


  SetStr( Data, 'ObjectType=8' );
  nbInterface( 1, Data );
  ShowMessage( StrPas( Data ) );
  FreeStr( Data );

Designtime only!

PostPosted: Thu Aug 26, 2010 12:22 am
by David de Argentina
Thanks Hans-Peter !