Announcement

Collapse
No announcement yet.

Can I split a spinbox control?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Egbert Zijlema
    replied
    Edwin's idea does not work

    Well, it's a couple of days later than "tomorrow", but today I've tried Edwin's suggestion. It does not work quite well. I only can use one half of the same control. Maybe I should use the halfs of 2 different spinners? I'll give it a try, but perhaps it is a lot simpler to create my own IMAGEX arrow buttons, using an image editor.

    Leave a comment:


  • Egbert Zijlema
    replied
    Hello Dale,

    The so called standard bitmaps in Windows need to be loaded using LoadBitmap or LoadImage (API functions) and then should be sent (SendMessage) to a bitmap style button control (%BS_BITMAP). One cannot use CONTROL ADD IMGBUTTON(X).

    Leave a comment:


  • Dale Yarker
    replied
    ???
    CONTROL ADD IMGBUTTONX didn't stretch the arrow image?

    Leave a comment:


  • Egbert Zijlema
    replied
    Unfort. standard arrow bmps are scrollbar arrows

    Thanks guys,

    Michael: I've tried the standard bitmaps (%OBM_LFARROW et cetera), but it is not possible to enlarge them. So what you get is the scrollbar size arrow, which is too small in comparision to its neighbouring buttons.

    Edwin: I'll try your suggestion tomorrow. The spinbox arrows can be resized, therefore I prefer a "split solution" with those bitmaps.

    Leave a comment:


  • Edwin Knoppert
    replied
    Here it is:

    Code:
        Local hWndCtrl As Long
        Local hRgn As Long
        Local R As RECT
    
        Select Case nCbMsg
        Case %WM_INITDIALOG
        
            hWndCtrl = GetDlgItem( CbHndl, %ID_FORM1_UPDOWN1 )
        
            GetWindowRect( hWndCtrl, R )    
            hRgn = CreateRectRgn( 0, 0, R.nRight - R.nLeft, ( R.nBottom - R.nTop ) / 2 )
            SetWindowRgn( hWndCtrl, hRgn, 1 )

    Leave a comment:


  • Edwin Knoppert
    replied
    It's fairly simple to use regions.
    You simply remove the unwanted part.
    Of course you need to calculate all kind of things.

    Leave a comment:


  • Michael Mattias
    replied
    How about three side-by-side tiny button controls? To get the arrow keys you'll have to subclass but AFAIK updown controls are bipolar only,

    (Us sytle BS_BITMAP, and the arrow BMPs are standard ones you can load with LoadBitmap or LoadImage).


    MCM

    Leave a comment:


  • Egbert Zijlema
    started a topic Can I split a spinbox control?

    Can I split a spinbox control?

    Is it possible to split a spinbox control ("msctls_updown32") in 2 separate arrow buttons (left and right, using %UDS_HORZ-style)? I want a "home"-button in between. As normal the left arrow will count down, the right one up and the button in the middle should restore the initial setting of the counter.
Working...
X