Jump to content


Photo

TNxButtonInspectorNode6


  • Please log in to reply
4 replies to this topic

#1 DriveSoft

DriveSoft
  • Members
  • 29 posts

Posted 30 October 2015 - 06:16 PM

How to access to property TNxButtonEdit6 which owned node TNxButtonInspectorNode6?

 

 

example, when I create (Design-time) TNxButtonInspectorNode6, how to change property ButtonCaption of TNxButtonEdit6?

I can't find access from Delphi Inspector property or Run-time.

 

 

Thanks.



#2 Boki (Berg)

Boki (Berg)

    Boki (Berg)

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

Posted 30 October 2015 - 07:29 PM

Hi,

 

You can access via:

 

 Caption := NextInspector61.InplaceEdit.Text;

 

It is INxInplaceEdit type, but you can cast it to TNxButtonEdit6. Also, check it for nil, since CheckBox item and similar, don't set this property.

 

I am thinking about that when there is no InplaceEdit property of Item is set, to set it to created edit (?). Similar I do in NextGrid6.


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 DriveSoft

DriveSoft
  • Members
  • 29 posts

Posted 31 October 2015 - 01:54 AM

I already tried it, but catch exception, code:

procedure TForm1.Button3Click(Sender: TObject);
var
   CategoryRoot: TNxInspectorNode6;
begin
   CategoryRoot := NextInspector61.Nodes.Add(nil, TNxInspectorNode6);

   with NextInspector61.Nodes.Add(CategoryRoot, TNxButtonInspectorNode6) do
   begin
      Caption := 'Text';
      TNxButtonEdit6(InplaceEdit).ButtonCaption := '...'; // exception
   end;

end;

Also I can attach test project.



#4 Boki (Berg)

Boki (Berg)

    Boki (Berg)

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

Posted 31 October 2015 - 02:23 AM

I think that in your case youmare tatgeting InplaceEdit of node (with keyword), not TNrxtInspector6

I think that i will set InolaceEdit to node too
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.

#5 DriveSoft

DriveSoft
  • Members
  • 29 posts

Posted 31 October 2015 - 03:05 AM

Thanks! )






2 user(s) are reading this topic

0 members, 2 guests, 0 anonymous users