You are not logged in.

Dani

Intermediate

Posts: 325

Date of registration: Nov 19th 2009

Location: GERMANY

  • Send private message

21

Wednesday, November 14th 2012, 8:56pm

Hey there,

about the 'DblClick()' ...you mean in the 'cboList'?
I don't really see a chance.
Get a handle on that list an add a MoueseListener.
I don't know if that is possible, sorry..

This is not really satisfying either but it may give you an idea:

Jabaco Source

1
2
3
4
5
6
7
Public Sub Form_Load()
   ComboBox1.Visible = False 
End Sub

Public Sub ComboBox1_Click()
   ComboBox1.Visible = True
End Sub


Or simply place the ComboBox behind the Grid at designtime...

Dani

fomaxrge

Trainee

  • "fomaxrge" started this thread

Posts: 88

Date of registration: Aug 14th 2012

  • Send private message

22

Thursday, November 15th 2012, 10:59am

Hi Dani!

about the 'DblClick()' ...you mean in the 'cboList'?
Yes Dani in the cbolist i mean because all the other columns i edit on double click and i want to handle it with double click too.
Is it easy?

fomaxrge

Trainee

  • "fomaxrge" started this thread

Posts: 88

Date of registration: Aug 14th 2012

  • Send private message

23

Thursday, November 15th 2012, 4:36pm

Dani even thought i have tried to put my combobox behind my grid when the program runs i see them again

Dani

Intermediate

Posts: 325

Date of registration: Nov 19th 2009

Location: GERMANY

  • Send private message

24

Monday, November 19th 2012, 9:34am

Hey there,

forget everything about adding ComboBox1 in Form_Load ...

Use the 'build in' ComboBox like this:

Jabaco Source

1
2
3
4
5
6
7
8
9
Public Sub JBGrid1_BeforeCellEdit(row As Integer, col As Integer)
'Case 1 for column 1 (zero based)
   Select Case col
      Case 1 
         JBGrid1.ComboList = "Test1|Test2"   'invokes ComboList, use '|' as item seperator
      Case Else
         JBGrid1.ComboList = ""              'reset to DefaultEditor
   End Select
End Sub

to check what happened there:

Jabaco Source

1
2
3
Public Sub JBGrid1_AfterCellEdit(row As Integer, col As Integer)
   
End Sub

this is probably more robust and you do get your desired 'DblClick()' behaviour!

Dani

fomaxrge

Trainee

  • "fomaxrge" started this thread

Posts: 88

Date of registration: Aug 14th 2012

  • Send private message

25

Monday, November 19th 2012, 3:59pm

bad luck for me because that was the way i have started to work.
Now i have made a lot of code with the other way.
I have search option work perfect,
Also Delete and Insert...
BUT now that i have to make the update option the things are very very bad on me.

Do you have any idea to handle my combo with double click?

fomaxrge

Trainee

  • "fomaxrge" started this thread

Posts: 88

Date of registration: Aug 14th 2012

  • Send private message

26

Monday, November 19th 2012, 4:45pm

Dani my solution to hide the combobox is something like this...

Jabaco Source

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
Public Sub Form_Load()
ComboBox1.Visible = False 
ComboBox1.CanGetFocus = false
ComboBox1.Enabled = false
End Sub


Public Sub JBGrid1_Click()

If JBGrid1.Col = 1 Then

ComboBox1.Visible = True

ComboBox1.CanGetFocus = True

ComboBox1.Enabled = True

End If



End Sub

Rate this thread
WoltLab Burning Board