B4J Library [Custom Control] jIconBar

This is more playing with the new custom controls feature of B4J. (You need the latest beta version)

This was compiled with java 1.8-72.

This will add a control that has 34 of the popular social type websites (some I've never heard of TBH)

It creates a bar of icons up to 10 wide, if you go over that it creates subsequent rows until all the icons are added.

Not many commands from code
1, ??.Initialize - just sets the name and callback sub
2, ??.base_resize(Double , Double) - The size of each icon ie to have 32px x 32px icons use (32.0,32.0) and yes it does want 32.0 and not 32

In the designer it lists out all the available icons just tick the ones you want to appear in the bar.

All the images are packed in the library and are all free ones - free for commercial use too.

When adding the control via the designer, the size doesn't make much difference, as it resizes to image size. Only after if you call base_resize will the appearance change.

Hovering over any icon will cause a tooltip to appear with the name of the icon.

In code it returns the name of the button so your sub just checks for the name and acts accordingly.

jIconBar.zip is the library unzip to your extra libraries, and add to the project from libraries tab.

jIconBarTest.zip is funnily enough a test app of the library - I have documented it a bit, but enough.


UPDATE
Version 1.10 - made a few changes icons grow when mouse passes over them and shrink when it leaves.
 

Attachments

  • jIconBar.zip
    47.6 KB · Views: 299
  • jIconBarTest.zip
    2.5 KB · Views: 305
  • jIconBar.jpg
    jIconBar.jpg
    35.2 KB · Views: 448
  • jIconBar V1.10 .zip
    49.6 KB · Views: 305
Last edited:

Daestrum

Expert
Licensed User
Longtime User
V1.10 uploaded - aesthetic changes - look's prettier.
 
Top