09-30-2009 06:32 AM
10-01-2009 10:35 AM
Hi Shako,
What version of CVI and What OS are you using? I was able to create windows style/color scrollbars by modifying only the two options you mention in CVI 9.0 and Windows XP, so this should be all that you need to do. Please reply with an exmple showing this behavior so I can take a look.
10-02-2009 01:01 AM
Im using version 9.0.1 and running Xp Pro.
Here the code i use to create the scrollbar.
int ScrollBarId;
ScrollBarId=ScrollBar_Create (MainPnl, 48,18, 1, ScrollBarCallback, 0);
ScrollBar_SetAttribute (MainPnl,ScrollBarId, ATTR_SB_HEIGHT,(MainPnlHeight-47));
ScrollBar_SetAttribute (MainPnl, ScrollBarId, ATTR_SB_DOC_MIN,1);
ScrollBar_SetAttribute (MainPnl, ScrollBarId, ATTR_SB_PROP_THUMB,1);
ScrollBar_SetAttribute (MainPnl, ScrollBarId, ATTR_SB_VIEW_SIZE, 1);
I have added a picture of what the scroll bar looks like.
10-02-2009 09:56 AM
If you look at the source code for the scrollbar function panel (C:\Program Files\National Instruments\CVI90\toolslib\custctrl\scroll.c) you will see that the scrollbar control is actually a graph control, on which the buttons and thumb control are drawn programmatically. So it won't change appearance at all when you change the visual style of the panel.
If you want to change the way it looks, you will have to change the source code to draw it a different way (start at the DrawScrollBar() function to see how to do that).