Skip to content

Commit

Permalink
Added: Showing Selected Control Name in Properties and Events Windows
Browse files Browse the repository at this point in the history
  • Loading branch information
XusinboyBekchanov committed Aug 16, 2022
1 parent 0ee2c5a commit ba34132
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 6 deletions.
10 changes: 7 additions & 3 deletions src/Main.bas
Expand Up @@ -6019,15 +6019,19 @@ End Sub

tbProperties.ImagesList = @imgList
tbProperties.Align = DockStyle.alTop
tbProperties.Buttons.Add tbsCheck, "Categorized", , @tbProperties_ButtonClick, "PropertyCategory", "", ML("Categorized"), , tstEnabled Or tstChecked
tbProperties.List = True
tbProperties.Buttons.Add tbsCheck Or tbsAutosize, "Categorized", , @tbProperties_ButtonClick, "PropertyCategory", "", ML("Categorized"), , tstEnabled Or tstChecked
tbProperties.Buttons.Add tbsSeparator
tbProperties.Buttons.Add , "Property", , @tbProperties_ButtonClick, "Properties", "", ML("Properties"), , tstEnabled
tbProperties.Buttons.Add tbsAutosize, "Property", , @tbProperties_ButtonClick, "Properties", "", ML("Properties"), , tstEnabled
tbProperties.Buttons.Add tbsShowText, "", , , "SelControlName", "", "", , 0
tbProperties.Flat = True

tbEvents.ImagesList = @imgList
tbEvents.Align = DockStyle.alTop
tbEvents.Buttons.Add tbsCheck, "Categorized", , @tbProperties_ButtonClick, "EventCategory", "", ML("Categorized"), , tstEnabled
tbEvents.List = True
tbEvents.Buttons.Add tbsAutosize Or tbsCheck, "Categorized", , @tbProperties_ButtonClick, "EventCategory", "", ML("Categorized"), , tstEnabled
tbEvents.Buttons.Add tbsSeparator
tbEvents.Buttons.Add tbsShowText, "", , , "SelControlName", "", "", , 0
tbEvents.Flat = True

Sub txtPropertyValue_Activate(ByRef Sender As Control)
Expand Down
11 changes: 8 additions & 3 deletions src/TabWindow.bas
Expand Up @@ -916,7 +916,7 @@ Function TabWindow.CloseTab(WithoutMessage As Boolean = False) As Boolean
End Select
End If
Var ptabCode = Cast(TabControl Ptr, This.Parent)
pTabCode->Remove(@btnClose)
ptabCode->Remove(@btnClose)
miWindow->Remove This.mi
btnClose.FreeWnd
ptabCode->DeleteTab(This.Index)
Expand Down Expand Up @@ -1539,7 +1539,12 @@ Sub DesignerChangeSelection(ByRef Sender As Designer, Ctrl As Any Ptr, iLeft As
SelectedCtrl = Ctrl
SelectedCount = Sender.SelectedControls.Count
bNotFunctionChange = True
If tb->Des->Symbols(Ctrl) AndAlso tb->Des->Symbols(Ctrl)->ReadPropertyFunc <> 0 Then tb->cboClass.ItemIndex = tb->cboClass.Items.IndexOf(WGet(tb->Des->Symbols(Ctrl)->ReadPropertyFunc(Ctrl, "Name")))
If tb->Des->Symbols(Ctrl) AndAlso tb->Des->Symbols(Ctrl)->ReadPropertyFunc <> 0 Then
Dim As String SelControlName = WGet(tb->Des->Symbols(Ctrl)->ReadPropertyFunc(Ctrl, "Name"))
tbProperties.Buttons.Item("SelControlName")->Caption = SelControlName
tbEvents.Buttons.Item("SelControlName")->Caption = SelControlName
tb->cboClass.ItemIndex = tb->cboClass.Items.IndexOf(SelControlName)
End If
tb->FillAllProperties
If Sender.SelectedControls.Contains(Sender.SelectedControl) Then
tb->pnlForm.SetFocus
Expand Down Expand Up @@ -4608,7 +4613,7 @@ End Sub
Dim As Designer Ptr Des = user_data
allocation->x = Cast(Integer, g_object_get_data(G_OBJECT(widget), "@@@Left"))
allocation->y = Cast(Integer, g_object_get_data(G_OBJECT(widget), "@@@Top"))
allocation->Width = Des->DotSize
allocation->width = Des->DotSize
allocation->height = Des->DotSize
Return True
End Function
Expand Down

0 comments on commit ba34132

Please sign in to comment.