- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
I am trying to use the Spin control. How to set the Buddy window?
If I set the 'Auto Buddy' to True, It changes the text on Cancel button, not the Edit or Static control. Do I have to create Spin control after the one I want to use as a Buddy window?
Here is my code. Thanks for help.
Cheers,
Cean
SUBROUTINE UpdateEdit( dlg, control_name, callbacktype )
!DEC$ ATTRIBUTES DEFAULT:UpdateEdit
USE IFLOGM
IMPLICIT NONE
TYPE (dialog) dlg
INTEGER control_name
INTEGER callbacktype
INCLUDE 'resource.fd'
CHARACTER(256) text
INTEGER cel
LOGICAL retlog
if (callbacktype == dlg_change) then
retlog = DlgGet( dlg, control_name, cel, DLG_POSITION )
WRITE (text,*) cel
retlog = DlgSet( dlg, IDC_EDIT1, TRIM(ADJUSTL(text)) )
endif
END SUBROUTINE UpdateEdit
subroutine bjCard(hDC)
USE IFLOGM
use ifwinty, only: HANDLE
implicit none
INCLUDE 'resource.fd'
TYPE (dialog) dlg
integer(HANDLE) hDC
logical retlog
integer ai
retlog = DlgInit( IDD_DIALOG1, dlg )
!retlog = DlgSet( dlg, IDC_STATIC, 1)
retlog = DlgSet( dlg, IDC_EDIT1, 0)
retlog = DlgSet( dlg, IDC_SPIN1, 0, DLG_RANGEMIN)
retlog = DlgSet( dlg, IDC_SPIN1, 8, DLG_RANGEMAX)
retlog = DlgSet( dlg, IDC_SPIN1, 4, DLG_POSITION)
!CALL UpdateStatic( dlg, IDC_SPIN1, DLG_CHANGE)
CALL UpdateEdit( dlg, IDC_SPIN1, DLG_CHANGE)
retlog = DlgModal(dlg)
end
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I do not have experience with 'Auto Buddy' but readying the documentation I suspect the buddy window is the next control in the tab order so you need to adjust the tab order of the controls.
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I do not have experience with 'Auto Buddy' but readying the documentation I suspect the buddy window is the next control in the tab order so you need to adjust the tab order of the controls.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
After changing the tab order, when I click a spin arrow, it changes the value of the EDIT control.
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page