Jump to content

Attempt to detect when ComboBox value has been selected(Clicked) not highlighted with mouse pointer


Recommended Posts

Posted

I have a ComboBox that I am watching for change of selection with:
 

_GUICtrlComboBox_GetCurSel($MyCOMBO)

The issue is that when I click on the pulldown and any time the mouse pointer hovers over a selection the app thinks I have selected.

Is there any way to only detect the value when it has been clicked and is actually selected? Thank You in advance!  :)

Posted
; Watch for bitrate change and kill FFMPEG if changed.
                If $FFMPEGIO_ffmpeg_SHOULD_BE_RUNNING = 1 Then
                        $sSelected_DESTINATION_COMBO_READ_ID = _GUICtrlComboBox_GetCurSel($iVIDEO_BITRATE_COMBO)
                        If $Running_sDESTINATION_COMBO_READ_ID <> $sSelected_DESTINATION_COMBO_READ_ID Then
                                $Running_sDESTINATION_COMBO_READ_ID = _GUICtrlComboBox_GetCurSel($iVIDEO_BITRATE_COMBO)
                                ConsoleWrite('Bitrate changed!' & @CRLF)
                                Call( "KILL_FFMPEG" )
                        EndIf
                EndIf
                sleep(100)

 

Posted
1 hour ago, kevev said:
; Watch for bitrate change and kill FFMPEG if changed.
                If $FFMPEGIO_ffmpeg_SHOULD_BE_RUNNING = 1 Then
                        $sSelected_DESTINATION_COMBO_READ_ID = _GUICtrlComboBox_GetCurSel($iVIDEO_BITRATE_COMBO)
                        If $Running_sDESTINATION_COMBO_READ_ID <> $sSelected_DESTINATION_COMBO_READ_ID Then
                                $Running_sDESTINATION_COMBO_READ_ID = _GUICtrlComboBox_GetCurSel($iVIDEO_BITRATE_COMBO)
                                ConsoleWrite('Bitrate changed!' & @CRLF)
                                Call( "KILL_FFMPEG" )
                        EndIf
                EndIf
                sleep(100)

 

This is not a runnable code. If you want to watch for change of selection in a ComboBox look at _GUICtrlComboBox_Create() example in help file. Depending on your needs you can process $CBN_SELCHANGE or $CBN_EDITCHANGE messages received through WM_COMMAND.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...