FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour Add element near scrollbar
Posts: 375
Joined: Tue Feb 10, 2015 09:48 AM
Add element near scrollbar
Posted: Fri Sep 20, 2019 12:30 PM
Hello,
In my program would like to add a combo box near the scroll bar at bottom, in this way:

(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?
Posts: 6755
Joined: Wed Feb 15, 2012 08:25 PM
Re: Add element near scrollbar
Posted: Fri Sep 20, 2019 02:04 PM
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 (fw): Select all Collapse
   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. )
Cristobal Navarro

Hay dos tipos de personas: las que te hacen perder el tiempo y las que te hacen perder la noción del tiempo

El secreto de la felicidad no está en hacer lo que te gusta, sino en que te guste lo que haces

Continue the discussion