Page 1 of 1

Add element near scrollbar

Posted: Fri Sep 20, 2019 12:30 pm
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?

Re: Add element near scrollbar

Posted: Fri Sep 20, 2019 2:04 pm
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. )