Jump to content


Photo

Easy NxToolBar6 questions ...


  • Please log in to reply
13 replies to this topic

#1 Delphier

Delphier
  • Members
  • 10 posts

Posted 27 May 2016 - 02:04 PM

Good day.  I'm a new user of Next Components and am using Delphi 10.1 Berlin.

 

I have a few questions about the NxToolBar6 tool bar:

 

1 )  How do I remove buttons from a tool bar in code?

 

I have tried something like this:

 

var
  ii: integer;
  btn: TNxToolButton6;
begin
  while tb1.Buttons.Count > 0 do
    tb1.buttons.Items[0]. ???

 

 

end;

 

but what do I put where the ??? are?  Auto complete doesn't seem to come up with a sensible suggestion.

 

 

2 )  Is it possible to have the button text wrap over two or more lines?

 

I have tried insert a CRLF pair, but that didn't work.

 

3 ) It is possible to have the tool bar vertical with button one on top of the other?

 

Thanks

 

Edit:  I have just noticed that TNxToolButton6 doesn't have a tag property.  I have used tag over the years for many things.  Was the property not used for a reason?



#2 Boki (Berg)

Boki (Berg)

    Boki (Berg)

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

Posted 27 May 2016 - 04:01 PM

Hi,

Please read for answers:

1) As Buttons array is standard TCollection, you can use something like this:

NxToolbar61.Buttons.Delete(IndexOfButton);
2) I will add it.

3) Not yet, but I will add Orientation property for next update.

@Edit: I will add it now, I have forgot to include it. You can also add it inside TNxUserControl6 (NxControls6.pas)
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 Delphier

Delphier
  • Members
  • 10 posts

Posted 27 May 2016 - 05:14 PM

Thank you, Boki.

 

I also found UncheckAll method was not implemented.  I have set it to:

 

procedure TNxToolButtons6.UncheckAll;
var
  ii: integer;
begin
  for ii := 0 to Count - 1 do
    Items[ii].Checked := false;
end;

 

( Note my use of the double i - as the loop variable - I find it easier to search for and the ide highlights it better than a single i .   I'm starting a campaign to have it universally adopted :o  :rolleyes:  :P  :D   )

 

 

Thanks again



#4 Boki (Berg)

Boki (Berg)

    Boki (Berg)

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

Posted 27 May 2016 - 05:28 PM

Thanks,

I have completed it now. Not sure how I missed it.
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 Delphier

Delphier
  • Members
  • 10 posts

Posted 27 May 2016 - 06:05 PM

Easily done.

 

Thanks for your help.

 

Kind regards



#6 Boki (Berg)

Boki (Berg)

    Boki (Berg)

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

Posted 27 May 2016 - 07:21 PM

Hi,

I have added Orientation property for TNxToolbar6, and re-uploaded files. If you have time, maybe you can check it.

Just make sure that you re-compile packages. I will continue to testing it.
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.

#7 Delphier

Delphier
  • Members
  • 10 posts

Posted 31 May 2016 - 01:23 PM

Thank you, Boki.

 

Please can you advise which files I need to download and where I would get them from?

 

( Sorry to ask a basic question - I'm new to Next components and my Delphi environment and the installation of the Next components was done by someone else. )

 

Kind regards,



#8 Boki (Berg)

Boki (Berg)

    Boki (Berg)

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

Posted 31 May 2016 - 03:27 PM

Hi,

New releases are inside user.bergsoft.net (you probably need to ask for login info).

Then there is a v6 file to download.

After download you can delete content of existing folder and extract new files into same folder. Then you will only need to recompile packages.
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.

#9 Delphier

Delphier
  • Members
  • 10 posts

Posted 31 May 2016 - 03:56 PM

Thank you.  I'll let you know how I get on with the new orientation.

 

Regards,



#10 Delphier

Delphier
  • Members
  • 10 posts

Posted 31 May 2016 - 06:10 PM

I have tried out the orientation property.  It works nicely ... but .. I could do with multiline / word wrapped text as some of the text I need to display has 3 words.

 

I could also do with a button height or minimum height property as I like the buttons to be more square than they are with one line of text.

 

Thanks for sorting the orientation.

 

Regards,



#11 Boki (Berg)

Boki (Berg)

    Boki (Berg)

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

Posted 31 May 2016 - 06:36 PM

Hi,

I will try to do this things next. I will need couple of days.
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.

#12 Delphier

Delphier
  • Members
  • 10 posts

Posted 01 June 2016 - 10:30 AM

Thank you - that's very kind.



#13 Boki (Berg)

Boki (Berg)

    Boki (Berg)

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

Posted 10 June 2016 - 12:22 AM

Hi, I have uploaded pre-release with Height and Width property for each Button. Now I need to add wrapping. If you have desire, you can test it.
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.

#14 Delphier

Delphier
  • Members
  • 10 posts

Posted 13 June 2016 - 01:17 PM

Thank you, I'll see if I can get that done later today.

 

Kind regards






1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users