Professional UI Solutions
Site Map   /  Register


Please Log In to post a new message or reply to an existing one. If you are not registered, please register.

NOTE: Some forums may be read-only if you are not currently subscribed to our technical support services.

Forums » Prof-UIS Tech Support » CExtGridCellInplaceSlider question Collapse All
Subject Author Date
Offer Har Jun 17, 2008 - 9:58 AM

I need to have tick marks like in standard slider - how can these be added to the CExtGridCellInplaceSlider cell?



Technical Support Jun 20, 2008 - 4:38 AM

We tried to repaint the standard slider common control some time ago using its custom painting features and we found that it’s does not support tick mark custom painting. Besides tick marks in it can be displayed as some set of lines which is not related to the slider range. This is always true if the width of a horizontal slider in pixels is much less than the scrollable range. Painting real tick marks using sub-pixel graphic effects may potentially produce gray solid line instead of tick marks. That is we always prefer a slider without tick marks. It’s possible to implement smarter tick marks even with optimally displayed labels like in the chart control in the following test project: such smart tick marks will look heavy near the slider control or slider grid cell.

Offer Har Jun 21, 2008 - 9:43 AM

1) The reason ticks are in sliders, is that a lot of times there are special values in sliders. I must have a tick in the center at least - so that I can set back the value to the default. Can you implement something like "double-click returns to default" feature?

2) The link in the post leads to an error page - please check.

Technical Support Jun 23, 2008 - 3:46 AM

1) Please search for "Second: " in the source code of the ProfUIS_Controls sample so you can find the following code in PageGrid.cpp:

            else if( nRowNo == 1 )
                  pCell->TextSet( _T("Second: ") );
Modify it in this way:
            else if( nRowNo == 1 )
                  pCell->TextSet( _T("Second: ") );
                  pCell->ScrollTotalRangeSet( 6 ); // 1) add this line
                  pCell->ScrollPosSet( 3 );        // 2) add this line
Compile and run the sample, select the Grid dialog page, click on the Inplace Slider hyperlink in the rightmost column with hyperlinks to display a column with inplace slider grid cells. Now you can see a slider cell in the second grid row. This cell has the "Second: " label. Please try this slider grid cell and let us know what you think about the behavior of its thumb button.

Of course, this is not the same as sticking to some single position at center. But if you don’t need detailed values in your slider cells, then you may choose this solution.

2) Sorry. The correct link is

Offer Har Jun 24, 2008 - 10:03 AM

Regarding 2 - Cannot build it - I get this errors (I build it in 2005, don’t have VC6):

1>CVTRES : fatal error CVT1100: duplicate resource.  type:MANIFEST, name:1, language:0x0409
1>LINK : fatal error LNK1123: failure during conversion to COFF: file invalid or corrupt

Offer Har Jun 24, 2008 - 9:58 AM

The concept you suggested in 1 is not good enough. I must have a simple way to move the slider back to the center of the slider. What you suggest, which is making it have less values it not good enough. My slider is a dimmer, which makes the display lighter or darker, so it must have a high resolution, but must have some way of making the dimmer go back to the default light.