This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Sub MyButtonCallbackShowImage(control As IRibbonControl, ByRef showImage) | |
| Select Case control.ID | |
| Case "MyBtn1" | |
| 'Можно ещё так »» showImage = 0; 1; | |
| showImage = False | |
| Case "MyBtn2" | |
| showImage = True | |
| End Select | |
| End Sub |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Sub MyButtonCallbackShowLabel(control As IRibbonControl, ByRef showLabel) | |
| Select Case control.ID | |
| Case "MyBtn1" | |
| showLabel = False | |
| End Select | |
| End Sub |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Sub CallbackGetSize(control As IRibbonControl, ByRef size) | |
| ' Callback size | |
| ' 0 = normal | |
| ' 1 = large | |
| Select Case control.ID | |
| Case "myBtn1" | |
| size = 0 | |
| Case "myBtn2" | |
| size = 1 | |
| End Select |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Sub MyEditBoxCallbackgetText(control As IRibbonControl, ByRef strText) | |
| Select Case control.ID | |
| Case "MyEditBox" | |
| strText = "Hello World" | |
| ' strText = "Cat""Lucky""" | |
| ' Case Else | |
| 'Почему `Tag` не знаю, возможно используется в `XML`. | |
| ' strText = getTheValue(control.Tag, "DefaultValue") | |
| End Select | |
| End Sub |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Sub MyEditBoxCallbackOnChange(control As IRibbonControl, strText As String) | |
| Select Case control.ID | |
| Case "MyEditBox" | |
| MsgBox "Значение “Editbox” : " & _ | |
| strText, vbInformation, "Это заголовок!" | |
| End Select | |
| End Sub |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Sub CallbackGetTitle(control As IRibbonControl, ByRef title) | |
| Select Case control.ID | |
| Case "mySeparator2" | |
| title = "My Title" | |
| End Select | |
| End Sub |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Sub CallbackCBGetItemCount(control As IRibbonControl, ByRef count) | |
| 'Callback кол-во Items | |
| Select Case control.ID | |
| Case "myComboBox" | |
| count = 4 | |
| End Select | |
| End Sub |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Sub CallbackCBGetItemID(control As IRibbonControl, _ | |
| index As Integer, _ | |
| ByRef itemID) | |
| itemID = Format(index, "00") & "a" | |
| End Sub |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Sub CallbackCBGetItemImage(control As IRibbonControl, _ | |
| index As Integer, _ | |
| ByRef image) | |
| Select Case control.ID | |
| Case "myComboBox" | |
| Set image = LoadPicture(getAppPath & _ | |
| "Pictures\" & _ | |
| Format(index, "00") & ".JPG") | |
| 'Case else 'Или – ImageMso | |
| image = "HappyFace" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Sub CallbackCBGetItemLabel(control As IRibbonControl, _ | |
| index As Integer, _ | |
| ByRef label) | |
| Select Case control.ID | |
| Case "myComboBox" | |
| label = DLookup("txtName", "tblPictures", _ | |
| "txtPicName='" & _ | |
| Format(index, "00") & "'") | |
| End Select | |
| End Sub |