Jump to content


Photo

Always NextInspector


  • Please log in to reply
17 replies to this topic

#1 array81

array81

    Senior Member

  • Members
  • PipPip
  • 290 posts
  • Gender:Male

Posted 07 March 2017 - 01:17 AM

Please see the image. Is it possible create something like a tree?

Attached File  request.jpg   15.18KB   0 downloads

 

Besides, I like this code to add image to TNxToolBarInspectorNode6 buttons:

with TNxToolBarInspectorNode6(InsNodeItem).Buttons.Add do
begin
  Autocheck := False;
  imlTags.GetBitmap(0, Glyph);
end;

I have set ColorDepth of imlTags to cd32Bit and add bitmap image with 32bit and transparent layer, however how you can see on green icon, the transparent doesn't works.



#2 Boki (Berg)

Boki (Berg)

    Boki (Berg)

  • Forum Admin
  • PipPipPipPipPip
  • 7,835 posts
  • Gender:Male

Posted 08 March 2017 - 12:01 AM

Hi,

At the moment, this checkbox indentation is there by design (to mimic Visual Studio Properties Window). But I will try to have switch property to control this. It may take week or two.

Button:

Glyph is currently of TBitmap type. Maybe I can add TransparentColor property if you want? I can be added quickly
boki@bergsoft.net | LinkedIn Profile
--
BergSoft Home Page: www.bergsoft.net
Members Section: bms.bergsoft.net
Articles and Tutorials: dn.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 array81

array81

    Senior Member

  • Members
  • PipPip
  • 290 posts
  • Gender:Male

Posted 08 March 2017 - 01:27 AM

I need create buttons by code so I prefer use picture from TImageList. Is there a way to import image from TImageList with transparent layer?



#4 Boki (Berg)

Boki (Berg)

    Boki (Berg)

  • Forum Admin
  • PipPipPipPipPip
  • 7,835 posts
  • Gender:Male

Posted 08 March 2017 - 09:41 AM

Hi,

You can extract bitmap from TImageList (standard Delphi). Or, I can implement Images and ImageIndex properties. Similar like I done with ToolbarColumn for Grid.
boki@bergsoft.net | LinkedIn Profile
--
BergSoft Home Page: www.bergsoft.net
Members Section: bms.bergsoft.net
Articles and Tutorials: dn.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 array81

array81

    Senior Member

  • Members
  • PipPip
  • 290 posts
  • Gender:Male

Posted 08 March 2017 - 11:55 AM

Hi,

You can extract bitmap from TImageList (standard Delphi). Or, I can implement Images and ImageIndex properties. Similar like I done with ToolbarColumn for Grid.

 

I have try this to extract bitmap from TImageList:

imlTags.GetBitmap(0, Glyph);

The image is ok but transparent layer doesn't work. If I create the button on design time and use the same bitmap it work



#6 Boki (Berg)

Boki (Berg)

    Boki (Berg)

  • Forum Admin
  • PipPipPipPipPip
  • 7,835 posts
  • Gender:Male

Posted 08 March 2017 - 07:08 PM

Hi,

Maybe this answer on SO can help you:
http://stackoverflow...-from-imagelist

I can add TransparentColor as first step.
boki@bergsoft.net | LinkedIn Profile
--
BergSoft Home Page: www.bergsoft.net
Members Section: bms.bergsoft.net
Articles and Tutorials: dn.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 Boki (Berg)

Boki (Berg)

    Boki (Berg)

  • Forum Admin
  • PipPipPipPipPip
  • 7,835 posts
  • Gender:Male

Posted 09 March 2017 - 09:40 PM

Hi,

Also added Transparent and TransparentColor properties for each button.
boki@bergsoft.net | LinkedIn Profile
--
BergSoft Home Page: www.bergsoft.net
Members Section: bms.bergsoft.net
Articles and Tutorials: dn.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.

#8 Boki (Berg)

Boki (Berg)

    Boki (Berg)

  • Forum Admin
  • PipPipPipPipPip
  • 7,835 posts
  • Gender:Male

Posted 09 March 2017 - 10:18 PM

Hi,

Just uploaded update. You can try these 2 properties and VisualCells property of Node. Also, I have fixed color for top-level items when node is divided.
boki@bergsoft.net | LinkedIn Profile
--
BergSoft Home Page: www.bergsoft.net
Members Section: bms.bergsoft.net
Articles and Tutorials: dn.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 array81

array81

    Senior Member

  • Members
  • PipPip
  • 290 posts
  • Gender:Male

Posted 12 March 2017 - 12:25 AM

I don't understand how use  Transparent and TransparentColor properties. I use 32bit bitmap with TImageList, so I don't have a single color to set transparent.



#10 array81

array81

    Senior Member

  • Members
  • PipPip
  • 290 posts
  • Gender:Male

Posted 12 March 2017 - 12:47 PM

I have also use stackoverflow ideas but the sesult is the same.



#11 Boki (Berg)

Boki (Berg)

    Boki (Berg)

  • Forum Admin
  • PipPipPipPipPip
  • 7,835 posts
  • Gender:Male

Posted 12 March 2017 - 08:36 PM

Hi,

I understand now, I will add support for 32bit bitmaps (already have a function that draws them).
boki@bergsoft.net | LinkedIn Profile
--
BergSoft Home Page: www.bergsoft.net
Members Section: bms.bergsoft.net
Articles and Tutorials: dn.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 Boki (Berg)

Boki (Berg)

    Boki (Berg)

  • Forum Admin
  • PipPipPipPipPip
  • 7,835 posts
  • Gender:Male

Posted 12 March 2017 - 09:22 PM

Hi,

I have uploaded another build, very small change in NxInspectorNodeViewClass6.pas file.

Please tell me how it work now for you. You will probably need to rebuild packages if you want to try it design-time.
boki@bergsoft.net | LinkedIn Profile
--
BergSoft Home Page: www.bergsoft.net
Members Section: bms.bergsoft.net
Articles and Tutorials: dn.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.

#13 array81

array81

    Senior Member

  • Members
  • PipPip
  • 290 posts
  • Gender:Male

Posted 15 March 2017 - 04:20 PM

Sorry for late.

I have replace the new version and rebuild all packages but I get the same result if I tray to load bitmap from TImageList on runtime. If I use the same bitmap on designtime all works.



#14 Boki (Berg)

Boki (Berg)

    Boki (Berg)

  • Forum Admin
  • PipPipPipPipPip
  • 7,835 posts
  • Gender:Male

Posted 15 March 2017 - 09:31 PM

Hi,

Now you can load 32bit (with transparency) bitmaps directly into Glyph property of single Button. You load it in design-time too.
boki@bergsoft.net | LinkedIn Profile
--
BergSoft Home Page: www.bergsoft.net
Members Section: bms.bergsoft.net
Articles and Tutorials: dn.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.

#15 array81

array81

    Senior Member

  • Members
  • PipPip
  • 290 posts
  • Gender:Male

Posted 15 March 2017 - 09:47 PM

I don't have problem with design-time. This works also with old update.

I need create the button at run-time so I'd like assign image from TImageList. The problem is this. When I load image with code posted on first message the transparent doesn't wotk.



#16 Boki (Berg)

Boki (Berg)

    Boki (Berg)

  • Forum Admin
  • PipPipPipPipPip
  • 7,835 posts
  • Gender:Male

Posted 16 March 2017 - 12:09 AM

Hi,

You probably need to extract bitmap from ImgList as 32bit. (Not sure how to do that in Delphi at the moment). This GetBitmap method maybe discard alpha channel.

This bitmap will now work (transparency will be applied).

Can you maybe send me this image you use? I can experiment with properties to see what is needed.
boki@bergsoft.net | LinkedIn Profile
--
BergSoft Home Page: www.bergsoft.net
Members Section: bms.bergsoft.net
Articles and Tutorials: dn.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.

#17 array81

array81

    Senior Member

  • Members
  • PipPip
  • 290 posts
  • Gender:Male

Posted 16 March 2017 - 12:27 AM

These are the icons.

 

Are there news about tree view?

Attached Files

  • Attached File  bmp.zip   6.36KB   1 downloads


#18 Boki (Berg)

Boki (Berg)

    Boki (Berg)

  • Forum Admin
  • PipPipPipPipPip
  • 7,835 posts
  • Gender:Male

Posted 18 March 2017 - 04:13 PM

About TreeView, you mean level shifting? If this I have tried to mimic Visual Studio properties control, but you can also set HideTopLevel to True and don't use this category items. Similar like in Delphi's Object Inspector.
boki@bergsoft.net | LinkedIn Profile
--
BergSoft Home Page: www.bergsoft.net
Members Section: bms.bergsoft.net
Articles and Tutorials: dn.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.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users