Propertygrid refresh in a pane |
Post Reply |
Author | |
ideafix
Newbie Joined: 12 March 2009 Location: Portugal Status: Offline Points: 4 |
Post Options
Thanks(0)
Posted: 12 March 2009 at 6:49pm |
Hi to everyone!
I have a question that I cannot find the solution. I am developing an MDI application that uses Docking panes. In pane A I have a treeview, and in another pane (pane B) I have a property grid (version 12). When I click in a tree node, I clear the property grid, and add some properties. What happens? When I add in form_load (in frmPropertyGrid) the properies appears, but when I click in a tree node, I add properties, but the PropertyGrid appears blank. Does anyone can help me? Thanks Ricardo |
|
Aaron
Senior Member Joined: 29 January 2008 Status: Offline Points: 2192 |
Post Options
Thanks(0)
|
Hi,
Can you show me what you do? Or just upload test project so I can look into it.
Thanks
|
|
Product: Xtreme SuitePro (ActiveX) version 15.0.2
Platform: Windows XP (32bit) - SP 2 Language: Visual Basic 6.0 Zero replies is not an option.... |
|
ideafix
Newbie Joined: 12 March 2009 Location: Portugal Status: Offline Points: 4 |
Post Options
Thanks(0)
|
Hi Aaron I have created a public function that updates de property grid...
This code is in frmpropertygrid
Public Sub CarregaGrelhaDados(ByVal strNomeTabela As String, Optional ByVal strDados As Variant)
Dim category As PropertyGridItem
Dim item As PropertyGridItem frmPropertyGrid.wndPropertyGrid.ToolTipContext.Style = xtpToolTipLuna
frmPropertyGrid.wndPropertyGrid.ShowInplaceButtonsAlways = False frmPropertyGrid.wndPropertyGrid.Categories.Clear Set category = frmPropertyGrid.wndPropertyGrid.AddCategory(objLangDef(51).strString) For i = 1 To UBound(objTipoDados) arrTipoDados = Split(objTipoDados(i), "|") arrToolTips = Split(objToolTips(i), "|") Select Case arrTipoDados(2) Case "bigint": IntTipo = PropertyItemNumber Case "int": IntTipo = PropertyItemNumber Case "varchar": IntTipo = PropertyItemString End Select If IntTipo = PropertyItemNumber Then strAux = arrTipoDados(1) Set item = category.AddChildItem(PropertyItemNumber, strAux, 10) Else strAux = arrTipoDados(1) Set item = category.AddChildItem(PropertyItemString, strAux, "100; 100") End If If arrTipoDados(4) = "0" Then item.ReadOnly = True Else item.ReadOnly = False End If item.ToolTip = arrToolTips(1) item.Expanded = True category.Expanded = True Next i End Function
Thanks!
|
|
Aaron
Senior Member Joined: 29 January 2008 Status: Offline Points: 2192 |
Post Options
Thanks(0)
|
Hi,
Form frmPropertyGrid is created (in DockingPanes attach event) as a new instance. It seems you can't have a reference to that form with MDI. You can make frmPropertyGrid public but you get an error: Only one MDI form allowed.
This will work with MDI, just test it and:
I don't know how to get around this in MDI... I have simular code with SDI and I can make calls in other forms. I don't know why I can't with MDI, maybe you know..... why?
|
|
Product: Xtreme SuitePro (ActiveX) version 15.0.2
Platform: Windows XP (32bit) - SP 2 Language: Visual Basic 6.0 Zero replies is not an option.... |
|
ideafix
Newbie Joined: 12 March 2009 Location: Portugal Status: Offline Points: 4 |
Post Options
Thanks(0)
|
Yeap!
It work, Aaron! I have removed the code. Finally it works! Thanks a lot! Ricardo |
|
aridheva
Newbie Joined: 21 May 2009 Location: Indonesia Status: Offline Points: 1 |
Post Options
Thanks(0)
|
Good Job |
|
Post Reply | |
Tweet
|
Forum Jump | Forum Permissions You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |