Jump to content


Photo

Clearing Values of a TNxInspector


  • Please log in to reply
5 replies to this topic

#1 wvd_vegt

wvd_vegt

    Master Member

  • Honorable Members
  • PipPipPipPipPip
  • 710 posts
  • Gender:Male
  • Location:the Netherlands

Posted 18 April 2006 - 09:05 PM

Hi,

Small piece of code that i wrote to clear values of a TNxInspector.

CODE
procedure ClearInspector(const c: TNxPropertyItems);

var

 i                 : Integer;

begin

 for i := 0 to Pred(c.Count) do

   begin

     c.Item[i].Value := '';

     ClearInspector(c.Item[i].Items);

   end;

end;


Call with:

CODE
 ClearInspector(NextInspector1.Categories);

G.W. van der Vegt

#2 Guest_Anonymous_*

Guest_Anonymous_*
  • Guests

Posted 25 April 2006 - 03:13 PM

Inspector.Categories.Clear

also does that for you :wink:

#3 wvd_vegt

wvd_vegt

    Master Member

  • Honorable Members
  • PipPipPipPipPip
  • 710 posts
  • Gender:Male
  • Location:the Netherlands

Posted 26 April 2006 - 10:29 AM

Hi Guest (or forgot to login),

QUOTE
Inspector.Categories.Clear

Clears both left and right side of the inspector (so categories, items and their values) leaving you with almost nothing.

The code I posted walks the itens and clears only their values leaving the categories and items as they where.
G.W. van der Vegt

#4 Bas

Bas
  • Members
  • 28 posts

Posted 26 April 2006 - 11:22 AM

Hi, it is I also known as Guest 8)

Yup, you are right.

Btw, leuk om nog een NL-er te zien!

#5 wvd_vegt

wvd_vegt

    Master Member

  • Honorable Members
  • PipPipPipPipPip
  • 710 posts
  • Gender:Male
  • Location:the Netherlands

Posted 26 April 2006 - 12:39 PM

Damm, what gave me away, the photo? ;-)
G.W. van der Vegt

#6 Bas

Bas
  • Members
  • 28 posts

Posted 02 May 2006 - 04:50 PM

No, the loca... uhm.. yeah your photo 8)




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users