NTK and The NTK Project
are properties of Jn Dechereux
Home | Documentation | FAQ.

Vanilla 1.1.8 is a product of Lussumo. More Information: Documentation, Community Support.

Welcome Guest!
Want to take part in these discussions? If you have an account, sign in now.
If you don't have an account, apply for one now.
    •  
      CommentAuthorohaldi
    • CommentTimeMar 18th 2017 edited
     
    Hello
    I have a Toolbar Title like this:

    SET RGB COLOR TEXT NTK_RGB(255,128,0) BACK NTK_RGB(100,100,100)
    @ 0,0 SAY HB_OemToAnsi("Tollbar Title") SIZE nHHB, nMaxCol;
    STYLE DT_SINGLELINE+DT_CENTER+DT_VCENTER;
    FONT NTK_GetStockObject(SYSTEM_FONT);
    INTO CONTEXT hDC

    The background color ist : RGB(100,100,100)
    My problem is, that the buttons border color are not the same (see picture)
    I can't find our where I have to setup this color?
    In the command CREATE TOOLBAR FROM aTbBtnList, I dont see any thing!

    Many thanks for your help
    Otto
    •  
      CommentAuthorLucas
    • CommentTimeMar 20th 2017 edited
     
    AFAIK, only the NTK_OD_FREESHAPE button type allows full control on button features and behaviour.
    In your case, just add BACKCOLOR NTK_RGB(100,100,100) to each toolbar member, and replace your
    @ y,x CREATE TOOLBAR .... BUTTON TYPE NTK_BT_OWNERDRAWN/NTK_BT_STANDARD...
    with
    @ y,x CREATE TOOLBAR .... BUTTON TYPE NTK_OD_FREESHAPE...

    BR,
    Lucas
    •  
      CommentAuthorohaldi
    • CommentTimeMar 20th 2017 edited
     
    I don't find any definition for NTK_OD_FREESHAPE ?
    I scanned the whole \Wntk4hrb directory

    I think the background color of the buttons are the same as the main windows.
    But the buttons are placed over the title banner and do not take this color as background color!
    Code for the Title Banner:
    SET RGB COLOR TEXT NTK_RGB(255,128,0) BACK NTK_RGB(100,100,100)
    @ 0,0 SAY "Title Banner" SIZE nHHB, nMaxCol;
    STYLE DT_SINGLELINE+DT_CENTER+DT_VCENTER;
    FONT NTK_GetStockObject(SYSTEM_FONT);
    INTO CONTEXT hDC
    •  
      CommentAuthorAbbougaga
    • CommentTimeMar 20th 2017
     
    Hi Otto,
    Lucas is right but was certainly talking about "NTK_BT_OD_FREESHAPE".

    BTW, you cannot change certain parameters (e.g. bkg or border colors) when using NTK_BT_STANDARD or NTK_BT_OWNERDRAWN button type. Both are using a pre-defined theme.
    Indeed, buttons that use NTK_BT_STANDARD type are directly ruled by the MS-Windows default theme/manifest.xml. And buttons created with NTK_BT_OWNERDRAWN type use the NTK predefined theme & colors as declared in NTKBTN.ch

    Cheers,
    Ab
    •  
      CommentAuthorohaldi
    • CommentTimeMar 22nd 2017
     
    Hello Ab,
    Many thanks for your help
    I tried all version of parameters, only with NTK_BT_OWNERDRAWN I have a good result!
    I did some test by changing the background colors defines in NTKBTN.ch but without success.
    I give up. I leave my buttons like that. I will continue to learn the other functions of NTK.
    Regards
    Otto
    •  
      CommentAuthorAbbougaga
    • CommentTimeMar 23rd 2017 edited
     
    Hi Otto,
    I agree NTK_BT_OWNERDRAWN is a quick and efficient way to get nice buttons with modern style. But it's nothing compared to the awsome possibilities of the powerful NTK_BT_OD_FREESHAPE buttons. Your imagination is the only limit! Maybe I could show you a couple tricks if you could post a zip with your PRG+Resources........... However you have tons of NTK tutorials that use NTK_BT_OD_FREESHAPE buttons. e.g. dGridView, Layer, BtnBmp, DemoNTKSkin, and so on.
    •  
      CommentAuthorohaldi
    • CommentTimeMar 24th 2017
     
    Hi Ab,
    Here my PRG+Resources.
    Thanks in advance for your help.
    Regards
    Otto
    •  
      CommentAuthorAbbougaga
    • CommentTimeMar 24th 2017
     
    Hi Otto,

    Here are 2 quick samples that show how to use NTK_BT_OD_FREESHAPE buttons.
    Both are based on your original PRG+resources, only minors changes have been done. Now it's up to you to invent better styles. All is a matter of bitmap & imagination. :wink:
    HTH
    Ab,
    •  
      CommentAuthorohaldi
    • CommentTimeMar 24th 2017
     
    Hi Ab,
    Many thanks for your help.
    Now I have to read your changes to understand NTK logic!
    Regards
    Otto
Add your comments
  • Format comments as