Add element near scrollbar

Post Reply
AntoninoP
Posts: 347
Joined: Tue Feb 10, 2015 9:48 am
Location: Albenga, Italy
Contact:

Add element near scrollbar

Post by AntoninoP »

Hello,
In my program would like to add a combo box near the scroll bar at bottom, in this way:
Image
(I did it in GIMP)
But I don't found a way to resize the built in scrollbar or reduce the window client area...

Someone know how do that?
User avatar
cnavarro
Posts: 5792
Joined: Wed Feb 15, 2012 8:25 pm
Location: España

Re: Add element near scrollbar

Post by cnavarro »

This is a possible solution although it is not the most correct.
Put your combobox in column 0 of the msgbar, or define an item with the width you consider and insert your combobox in that item. The same can be done by inserting your scrollbar in a second item. Note that you probably have to program the behavior of the scrollbar control and resize this control

Code: Select all

   DEFINE WINDOW oWindow FROM nRow, nCol TO nWAlto + nRow, nWAncho + nCol ; 
      PIXEL COLOR CLR_WHITE, Rgb( 182, 182, 182 ) 

      oMsg  := TMsgBar():New( oWindow, , .F., .F., .F., .F., oWindow:nClrtext, ;
          oWindow:nClrPane, , .F., .F., .F., .F., .T. ) //l2010, lBorder, l2015 )

      //METHOD New( nRow, nCol, nMin, nMax, nPgStep, lVertical, oWnd, nWidth, nHeight,;
      //      bUpAct, bDownAct, bPgUp, bPgDown, bPos, lPixel, nClrText,;
      //      nClrBack, cMsg, lUpdate, bWhen, bValid, lDesign ) CLASS TScrollBar
      oHScroll := TScrollbar():New( 1, 250, 0, 100, , .F., oMsg, ;
                  oMsg:nWidth - ( 250 / 2 ) - oMsg:nHeight * 2 + 2, ;
                  oMsg:nHeight - 2, , , , , , .T. )
 
C. Navarro
Hay dos tipos de personas: las que te hacen perder el tiempo y las que te hacen perder la noción del tiempo
Si alguien te dice que algo no se puede hacer, recuerda que esta hablando de sus limitaciones, no de las tuyas.
Post Reply