This is a migrated thread and some comments may be shown as answers.

ChangeUICues event in button does not fired

3 Answers 147 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Emily Fong
Top achievements
Rank 1
Emily Fong asked on 01 Apr 2011, 08:24 AM
Hi,

I have two RadForms (a master and detail form).  In the master form, I have one RadButton which display the detail form.
In the detail form, there are two textboxes.
The steps for the problem as following:

1. Open the Master form.  When tab and focus on the button, the "ChangeUICues" event on that button will be fired. 
2. Click that button to open the detail form.
3. In the detail form, press "Tab" to focus on the second textbox.
4. Open the detail form. 
5. After the Master form display again, tab and focus on the button.  This time the "ChangeUICues" event on that button wouldn't be fired.

However, if I skip step 3, there is no problem.  Please advise.

Private Sub btnButton_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnButton
        frmDetail = New frmDetail 
                frmDetail.MdiParent = Me.MdiParent
                frmDetail.Top = 0
                frmDetail.Left = 0
                frmDetail.Show()
                Me.Hide()
End Sub
  
Private Sub frmDetail_FormClosed(ByVal sender As Object, ByVal e As System.Windows.Forms.FormClosedEventArgs) Handles frmDetail.FormClosed
        Me.Show() 
End Sub

3 Answers, 1 is accepted

Sort by
0
Stefan
Telerik team
answered on 07 Apr 2011, 08:27 AM
Hello Emily,

Thank you for writing.

ChangeUICues is not a reliable event on which you can count on. I will suggest that you use the Focus event in order to get notified when the button has the focus on it.

Let me know if the proposition works for you.

Regards,
Stefan
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
Emily Fong
Top achievements
Rank 1
answered on 08 Apr 2011, 04:14 AM
Actually, I have another problem with two RadForms (master and detail forms). 
In Master form, I have a listview with checkbox in each item and a button to show the detail form.  After click the button, the master form will be hidden (me.hide) and the detail form will be show (detailform.show).  Then, when the detail form closed, the master form will be show again (me.show).
The problem is :
When the master form show again, the itemcheck event in the listview is fired.  I don't know why it will be fired and how can I stop this event fired?

Private Sub btnDetail_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnDetail.Click
        Try
                frmDetail.WindowState = FormWindowState.Normal
                frmDetail.Top = 0
                frmDetail.Left = 0
                frmDetail.Activate()
                frmDetail.BringToFront()
                Me.Hide()
        Catch ex As Exception
            MessageBox.Show(ex.Message, Me.Text)
        End Try
    End Sub
  
Private Sub btnDetail_FormClosed(ByVal sender As Object, ByVal e As System.Windows.Forms.FormClosedEventArgs) Handles frmDetail.FormClosed
        Me.Show()
    End Sub
  
Private Sub ListView1_ItemCheck(ByVal sender As Object, ByVal e As System.Windows.Forms.ItemCheckEventArgs) Handles ListView1.ItemCheck
        Try
            _Presenter.IsChanging()
        Catch ex As Exception
            Cursor = Cursors.Arrow
            MessageBox.Show(ex.Message, Me.Text)
        End Try
    End Sub
0
Stefan
Telerik team
answered on 12 Apr 2011, 05:06 PM
Hi Emily, 

Thank you for writing back.

Please note that a ListView control is not part of our suite and questions concerning this control should be asked in the appropriate MSDN forums. However, I have tested you scenario, where you have ListView control on the Master form and a button. When the button is pressed Details form is opened. Then when I closed the Details form, the event in question was not fired. Please refer to the attached project and video.

Could you please modify the attached project in order to reproduce this behavior? This will allow me to investigate if this is something connected to our controls, and if it is, I will assist you in resolving it.

I am looking forward to your reply.

Regards,
Stefan
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Tags
General Discussions
Asked by
Emily Fong
Top achievements
Rank 1
Answers by
Stefan
Telerik team
Emily Fong
Top achievements
Rank 1
Share this question
or