185 |
Event event
|
184 |
UncheckItem event
|
183 |
CheckItem event
|
182 |
SelectItem event
|
181 |
ImageSize property on 32 (specifies the size of control' icons/images/check-boxes/radio-buttons)
|
180 |
ImageSize property on 16 (default) (specifies the size of control' icons/images/check-boxes/radio-buttons)
|
179 |
How do I get the item's value without the place holders (exclude mask-characters)
|
178 |
Is it possible to insert items at a specified position during runtime, without rebuilding the entire item which hosts the items
|
177 |
Is it possible to have a popup on a radio button when it is checked
#include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oExContextMenu LOCAL oitem oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oExContextMenu := XbpActiveXControl():new( oForm:drawingArea ) oExContextMenu:CLSID := "Exontrol.ContextMenu.1" /*{2DFBF6CB-9198-4576-AB91-EE6445C1F3E0}*/ oExContextMenu:create(,, {10,60},{610,370} ) oExContextMenu:ToString := "[group=0x03][id=0](Link[id=10][typ=2][grp=100][chk=1],Move To[id=20][typ=2][grp=100][spchk][arrow=0]())" oitem := oExContextMenu:Items:item(20) oitem:Items():Add("Item A",0,1000) oitem:Items():Add("Item B",0,1001) oitem:Items():Add("Item C",0,1002) DevOut( Transform(oExContextMenu:Select(),"") ) oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |
176 |
How can I control the height of the control, so no scroll is required to view all items
#include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oExContextMenu LOCAL oItems oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oExContextMenu := XbpActiveXControl():new( oForm:drawingArea ) oExContextMenu:CLSID := "Exontrol.ContextMenu.1" /*{2DFBF6CB-9198-4576-AB91-EE6445C1F3E0}*/ oExContextMenu:create(,, {10,60},{610,370} ) oExContextMenu:Font():Size := 6 oExContextMenu:MenuAppearance := 0/*exMenuNormal*/ oItems := oExContextMenu:Items() DevOut( Transform(oItems:VisibleItemsCount(),"") ) oItems:VisibleItemsCount := 255 oItems:ToString := "1,2,3,4,5,6,7,8,9,10,11,12,13" oExContextMenu:Select() oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |
175 |
How do I specify the control's height (method 3)
#include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oExContextMenu LOCAL oItems oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oExContextMenu := XbpActiveXControl():new( oForm:drawingArea ) oExContextMenu:CLSID := "Exontrol.ContextMenu.1" /*{2DFBF6CB-9198-4576-AB91-EE6445C1F3E0}*/ oExContextMenu:create(,, {10,60},{610,370} ) oItems := oExContextMenu:Items() oItems:Add("Item 1"):ItemHeight := 24 oItems:Add("Item 2"):ItemHeight := 24 oItems:Add("Item 3"):ItemHeight := 24 oExContextMenu:Select() oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |
174 |
How do I specify the control's height (method 2)
#include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oExContextMenu LOCAL oItems oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oExContextMenu := XbpActiveXControl():new( oForm:drawingArea ) oExContextMenu:CLSID := "Exontrol.ContextMenu.1" /*{2DFBF6CB-9198-4576-AB91-EE6445C1F3E0}*/ oExContextMenu:create(,, {10,60},{610,370} ) oItems := oExContextMenu:Items() oItems:Add("Item 1"):Padding := "0,4,0,4" oItems:Add("Item 2"):Padding := "0,4,0,4" oItems:Add("Item 3"):Padding := "0,4,0,4" oExContextMenu:Select() oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |
173 |
How do I specify the control's height (method 1)
|
172 |
How can I change the visual appearance of the progress bar
#include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oExContextMenu LOCAL oitem LOCAL oItems oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oExContextMenu := XbpActiveXControl():new( oForm:drawingArea ) oExContextMenu:CLSID := "Exontrol.ContextMenu.1" /*{2DFBF6CB-9198-4576-AB91-EE6445C1F3E0}*/ oExContextMenu:create(,, {10,60},{610,370} ) oExContextMenu:VisualAppearance():Add(1,"c:\exontrol\images\normal.ebn") oExContextMenu:SetProperty("Background",260/*0x104+*/,0x1000000) oItems := oExContextMenu:Items() oitem := oItems:Add("Progress") oitem:AllowEdit := 4/*exItemEditProgress*/ oitem:EditWidth := -128 oitem:EditValue := 25 oExContextMenu:Select() oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |
171 |
How can I change the progress's color
#include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oExContextMenu LOCAL oitem LOCAL oItems oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oExContextMenu := XbpActiveXControl():new( oForm:drawingArea ) oExContextMenu:CLSID := "Exontrol.ContextMenu.1" /*{2DFBF6CB-9198-4576-AB91-EE6445C1F3E0}*/ oExContextMenu:create(,, {10,60},{610,370} ) oExContextMenu:SetProperty("Background",260/*0x104+*/,AutomationTranslateColor( GraMakeRGBColor ( { 255,0,0 } ) , .F. )) oItems := oExContextMenu:Items() oitem := oItems:Add("Progress") oitem:AllowEdit := 4/*exItemEditProgress*/ oitem:EditWidth := -128 oitem:EditValue := 25 oExContextMenu:Select() oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |
170 |
I am using the Item.Visible property on False to hide the item, but the editor is still visible
PROCEDURE OnCheckItem(oExContextMenu,Itm) LOCAL oitem oitem := oExContextMenu:Items:item(1000) oitem:Visible := .T. oitem:AllowEdit := 260/*exItemEditReadOnly+exItemEditProgress*/ oExContextMenu:Select() RETURN PROCEDURE OnUncheckItem(oExContextMenu,Itm) LOCAL oitem oitem := oExContextMenu:Items:item(1000) oitem:Visible := .F. oitem:AllowEdit := 0/*exItemDisableEdit*/ oExContextMenu:Select() RETURN #include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oExContextMenu LOCAL oitem,oitem1,oitem2 LOCAL oItems,oItems1 oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oExContextMenu := XbpActiveXControl():new( oForm:drawingArea ) oExContextMenu:CLSID := "Exontrol.ContextMenu.1" /*{2DFBF6CB-9198-4576-AB91-EE6445C1F3E0}*/ oExContextMenu:create(,, {10,60},{610,370} ) oExContextMenu:CheckItem := {|Itm| OnCheckItem(oExContextMenu,Itm)} /*Occurs when the user checks the item.*/ oExContextMenu:UncheckItem := {|Itm| OnUncheckItem(oExContextMenu,Itm)} /*Occurs when the user unchecks the item.*/ oItems := oExContextMenu:Items() oitem := oItems:Add("",2) oItems1 := oitem:Items() oItems1:Add("Visible") oitem1 := oItems1:Add("") oitem1:Check := .T. oitem1:Checked := .T. oitem2 := oItems1:Add("Item 2",,1000) oitem2:ItemHeight := 18 oitem2:Caption := "Percent" oitem2:AllowEdit := 260/*exItemEditReadOnly+exItemEditProgress*/ oitem2:EditValue := 50 oitem2:Visible := .T. oItems1:Add("Visible") oitem:GroupPopup := 3/*exNoGroupPopupFrame+exGroupPopup*/ oExContextMenu:Select() oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |
169 |
How can I change the color of a disabled item
|
168 |
Microsoft Windows 8.1 - Ribbon Like
#include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oExContextMenu LOCAL oAppearance LOCAL oitem,oitem1,oitem10,oitem11,oitem12,oitem13,oitem14,oitem15,oitem16,oitem2,oitem3,oitem4,oitem5,oitem6,oitem7,oitem8,oitem9,var_item,var_item1,var_item2,var_item3,var_item4 LOCAL oItems,oItems1,oItems10,oItems11,oItems12,oItems13,oItems2,oItems3,oItems4,oItems5,oItems6,oItems7,oItems8,oItems9 oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oExContextMenu := XbpActiveXControl():new( oForm:drawingArea ) oExContextMenu:CLSID := "Exontrol.ContextMenu.1" /*{2DFBF6CB-9198-4576-AB91-EE6445C1F3E0}*/ oExContextMenu:create(,, {10,60},{610,370} ) oExContextMenu:MenuAppearance := 0/*exMenuNormal*/ oItems := oExContextMenu:Items() oItems:ToString := "[id=0][group=0x03](),[id=-20][bg=0x01000000][group=0x03][itemspad=4,4,4,4]([id=9000])" oItems1 := oItems:item(0):Items() oItems1:Add("",0,0):Padding := "8,0,0,0" var_item3 := oItems1:Add("New Page") var_item3:ToString := "[id=0][typ=2][chk=1][spchk=-1][show=1][grp=10][bghot=0x12000000][bgsel=0x11000000][bgselhot=0x14000000][group=0x03][tab=9000][pad=4,0,4,0][popupoffset=-4,-1]([id=0][group=0x03])" var_item3:ID := 200 var_item3:Caption := "Page1" var_item := var_item3:Items:Add("New Group") var_item:ToString := "[id=0][group=0x03][itemspad=4,4,4,18][itemsbg=0x02000000][itemsbghot=0x04000000]()" var_item:Caption := "<b><font ;14>A" oItems2 := var_item:Items() oItems2:BackgroundExt := "bottom[16,text=`<fgcolor A0A0A0><font ;8>Horizontal`,align=0x11]" oitem := oItems2:Add("",2) oitem:GroupPopup := 17/*exGroupPopupEqualWidth+exGroupPopup*/ oitem:Caption := "" oItems3 := oitem:Items() oitem1 := oItems3:Add("R1") oitem1:RadioGroup := 100 oitem1:Radio := .T. oitem1:ShowCheckedAsSelected := 1/*exDisplayItemHighlight*/ oitem1:Checked := .F. oitem2 := oItems3:Add("R2") oitem2:RadioGroup := 100 oitem2:Radio := .T. oitem2:ShowCheckedAsSelected := 1/*exDisplayItemHighlight*/ oitem2:Checked := .T. oitem3 := oItems3:Add("R3") oitem3:RadioGroup := 100 oitem3:Radio := .T. oitem3:ShowCheckedAsSelected := 1/*exDisplayItemHighlight*/ oitem3:Checked := .F. var_item1 := var_item3:Items:Add("New Group") var_item1:ToString := "[id=0][group=0x03][itemspad=4,4,4,18][itemsbg=0x02000000][itemsbghot=0x04000000]()" var_item1:Caption := "<b><font ;14>B" oItems4 := var_item1:Items() oItems4:BackgroundExt := "bottom[16,text=`<fgcolor A0A0A0><font ;8>Vertical`,align=0x11]" oitem4 := oItems4:Add("",2) oitem4:GroupPopup := 289/*exGroupPopupVertical+exGroupPopupEqualHeight+exGroupPopup*/ oitem4:Caption := "" oItems5 := oitem4:Items() oitem5 := oItems5:Add("C1") oitem5:Check := .T. oitem5:Checked := .T. oitem6 := oItems5:Add("C2") oitem6:Check := .T. oitem6:Checked := .F. oitem7 := oItems5:Add("C3") oitem7:Check := .T. oitem7:Checked := .T. var_item3:Items():Add("",0,0):Padding := "4,0,0,0" var_item2 := var_item3:Items:Add("New Group") var_item2:ToString := "[id=0][group=0x03][itemspad=4,4,4,18][itemsbg=0x02000000][itemsbghot=0x04000000]()" var_item2:Caption := "" oItems6 := var_item2:Items() oItems6:BackgroundExt := "bottom[16,text=`<fgcolor A0A0A0><font ;8>Mixt`,align=0x11]" oitem8 := oItems6:Add("",0) oitem8:AllowEdit := 1027/*exItemEditVertical+exItemEditSlider*/ oitem8:ItemHeight := 76 oitem8:EditBorder := 0/*exEditBorderNone*/ oitem8:EditValue := 25 oitem9 := oItems6:Add("",2) oitem9:GroupPopup := 259/*exGroupPopupVertical+exNoGroupPopupFrame+exGroupPopup*/ oitem9:Caption := "" oItems7 := oitem9:Items() oitem10 := oItems7:Add("",2) oitem10:GroupPopup := 3/*exNoGroupPopupFrame+exGroupPopup*/ oItems8 := oitem10:Items() oitem11 := oItems8:Add("Button1",2) oitem11:ShowAsButton := 275/*exShowAsSelectButtonBottom+exShowAsButtonAutoSize*/ oItems9 := oitem11:Items() oItems9:Add("Item 1") oItems9:Add("Item 2") oItems9:Add("Item 3") oItems8:Add("",0,0):Padding := "4,0,0,0" oitem12 := oItems8:Add("Button2",2) oitem12:ShowAsButton := 275/*exShowAsSelectButtonBottom+exShowAsButtonAutoSize*/ oItems10 := oitem12:Items() oItems10:Add("Item 4") oItems10:Add("Item 5") oItems10:Add("Item 6") oitem13 := oItems7:Add("Popup",2) oitem13:Alignment := 1/*exCenter*/ oItems11 := oitem13:Items() oItems11:Add("Item 7"):Check := .T. oItems11:Add("Item 8") oItems12 := oItems11:Add("Item 9",2):Items() oItems12:Add("Item 10") oItems12:Add("Item 11") oItems12:Add("Item 12") var_item4 := oItems1:Add("New Page") var_item4:ToString := "[id=0][typ=2][chk=0][spchk=-1][show=1][grp=10][bghot=0x12000000][bgsel=0x11000000][bgselhot=0x14000000][group=0x03][tab=9000][pad=4,0,4,0][popupoffset=-4,-1]([id=0][group=0x03])" var_item4:ID := 300 var_item4:Caption := "Page2" oItems13 := var_item4:Items() oitem14 := oItems13:Add("S1") oitem14:ItemHeight := 88 oitem14:AllowEdit := 1540/*exItemEditVertical+exItemEditSpin+exItemEditProgress*/ oitem14:EditValue := 25 oitem15 := oItems13:Add("S2") oitem15:ItemHeight := 88 oitem15:AllowEdit := 1540/*exItemEditVertical+exItemEditSpin+exItemEditProgress*/ oitem15:EditValue := 50 oitem16 := oItems13:Add("S3") oitem16:ItemHeight := 88 oitem16:AllowEdit := 1540/*exItemEditVertical+exItemEditSpin+exItemEditProgress*/ oitem16:EditValue := 75 oItems1:Add("",0,0):Padding := "8,0,0,0" oAppearance := oExContextMenu:VisualAppearance() oAppearance:Add(1,"C:/Program Files/Exontrol/ExContextMenu/Sample/EBN/MSFlat-Ribbon/msfr_background.ebn") oAppearance:Add(2,"C:/Program Files/Exontrol/ExContextMenu/Sample/EBN/MSFlat-Ribbon/msfr_groupt.ebn") oAppearance:Add(12,"C:/Program Files/Exontrol/ExContextMenu/Sample/EBN/MSFlat-Ribbon/msfr_hot.ebn") oAppearance:Add(14,"C:/Program Files/Exontrol/ExContextMenu/Sample/EBN/MSFlat-Ribbon/msfr_select.ebn") oAppearance:Add(17,"C:/Program Files/Exontrol/ExContextMenu/Sample/EBN/MSFlat-Ribbon/msfr_tab.ebn") oAppearance:Add(18,"C:/Program Files/Exontrol/ExContextMenu/Sample/EBN/MSFlat-Ribbon/msfr_tabhot.ebn") oAppearance:Add(32,"C:/Program Files/Exontrol/ExContextMenu/Sample/EBN/MSFlat-Ribbon/msfr_check0.ebn") oAppearance:Add(33,"C:/Program Files/Exontrol/ExContextMenu/Sample/EBN/MSFlat-Ribbon/msfr_check1.ebn") oAppearance:Add(34,"C:/Program Files/Exontrol/ExContextMenu/Sample/EBN/MSFlat-Ribbon/msfr_buttonu.ebn") oAppearance:Add(35,"C:/Program Files/Exontrol/ExContextMenu/Sample/EBN/MSFlat-Ribbon/msfr_buttond.ebn") oExContextMenu:Appearance := 16777216/*0x1000000+*/ oExContextMenu:SetProperty("Background",64/*exToolTipAppearance*/,oExContextMenu:Appearance()) oExContextMenu:SetProperty("SelBackColor",0xe000000) oExContextMenu:SetProperty("Background",110/*exMenuHotBackColor*/,0xc000000) oExContextMenu:SetProperty("Background",112/*exMenuSelHotBackColor*/,0x23000000) oExContextMenu:SetProperty("Background",2/*0x2+*/,0x22000000) oExContextMenu:SetProperty("Background",3/*0x3+*/,0x23000000) oExContextMenu:SetProperty("Background",70/*exCheckBoxState0*/,0x20000000) oExContextMenu:SetProperty("Background",71/*exCheckBoxState1*/,0x21000000) oExContextMenu:Select() oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |
167 |
Microsoft Paint - Ribbon Like
#include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oExContextMenu LOCAL oAppearance LOCAL oitem,oitem1,oitem10,oitem11,oitem12,oitem13,oitem14,oitem15,oitem16,oitem2,oitem3,oitem4,oitem5,oitem6,oitem7,oitem8,oitem9,var_item,var_item1,var_item2,var_item3,var_item4 LOCAL oItems,oItems1,oItems10,oItems11,oItems12,oItems13,oItems2,oItems3,oItems4,oItems5,oItems6,oItems7,oItems8,oItems9 oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oExContextMenu := XbpActiveXControl():new( oForm:drawingArea ) oExContextMenu:CLSID := "Exontrol.ContextMenu.1" /*{2DFBF6CB-9198-4576-AB91-EE6445C1F3E0}*/ oExContextMenu:create(,, {10,60},{610,370} ) oExContextMenu:MenuAppearance := 0/*exMenuNormal*/ oItems := oExContextMenu:Items() oItems:ToString := "[id=0][group=0x03](),[id=-20][bg=0x01000000][group=0x03][itemspad=4,4,4,4]([id=9000])" oItems1 := oItems:item(0):Items() oItems1:Add("",0,0):Padding := "8,0,0,0" var_item3 := oItems1:Add("New Page") var_item3:ToString := "[id=0][typ=2][chk=1][spchk=-1][show=1][grp=10][bghot=0x12000000][bgsel=0x11000000][bgselhot=0x14000000][group=0x03][tab=9000][pad=4,0,4,0][popupoffset=-4,-1]([id=0][group=0x03])" var_item3:ID := 200 var_item3:Caption := "Page1" var_item := var_item3:Items:Add("New Group") var_item:ToString := "[id=0][group=0x03][itemspad=4,4,4,18][itemsbg=0x02000000][itemsbghot=0x04000000]()" var_item:Caption := "<b><font ;14>A" oItems2 := var_item:Items() oItems2:BackgroundExt := "bottom[16,text=`<fgcolor A0A0A0><font ;8>Horizontal`,align=0x11]" oitem := oItems2:Add("",2) oitem:GroupPopup := 17/*exGroupPopupEqualWidth+exGroupPopup*/ oitem:Caption := "" oItems3 := oitem:Items() oitem1 := oItems3:Add("R1") oitem1:RadioGroup := 100 oitem1:Radio := .T. oitem1:ShowCheckedAsSelected := 1/*exDisplayItemHighlight*/ oitem1:Checked := .F. oitem2 := oItems3:Add("R2") oitem2:RadioGroup := 100 oitem2:Radio := .T. oitem2:ShowCheckedAsSelected := 1/*exDisplayItemHighlight*/ oitem2:Checked := .T. oitem3 := oItems3:Add("R3") oitem3:RadioGroup := 100 oitem3:Radio := .T. oitem3:ShowCheckedAsSelected := 1/*exDisplayItemHighlight*/ oitem3:Checked := .F. var_item1 := var_item3:Items:Add("New Group") var_item1:ToString := "[id=0][group=0x03][itemspad=4,4,4,18][itemsbg=0x02000000][itemsbghot=0x04000000]()" var_item1:Caption := "<b><font ;14>B" oItems4 := var_item1:Items() oItems4:BackgroundExt := "bottom[16,text=`<fgcolor A0A0A0><font ;8>Vertical`,align=0x11]" oitem4 := oItems4:Add("",2) oitem4:GroupPopup := 289/*exGroupPopupVertical+exGroupPopupEqualHeight+exGroupPopup*/ oitem4:Caption := "" oItems5 := oitem4:Items() oitem5 := oItems5:Add("C1") oitem5:Check := .T. oitem5:Checked := .T. oitem6 := oItems5:Add("C2") oitem6:Check := .T. oitem6:Checked := .F. oitem7 := oItems5:Add("C3") oitem7:Check := .T. oitem7:Checked := .T. var_item3:Items():Add("",0,0):Padding := "4,0,0,0" var_item2 := var_item3:Items:Add("New Group") var_item2:ToString := "[id=0][group=0x03][itemspad=4,4,4,18][itemsbg=0x02000000][itemsbghot=0x04000000]()" var_item2:Caption := "" oItems6 := var_item2:Items() oItems6:BackgroundExt := "bottom[16,text=`<fgcolor A0A0A0><font ;8>Mixt`,align=0x11]" oitem8 := oItems6:Add("",0) oitem8:AllowEdit := 1027/*exItemEditVertical+exItemEditSlider*/ oitem8:ItemHeight := 76 oitem8:EditBorder := 0/*exEditBorderNone*/ oitem8:EditValue := 25 oitem9 := oItems6:Add("",2) oitem9:GroupPopup := 259/*exGroupPopupVertical+exNoGroupPopupFrame+exGroupPopup*/ oitem9:Caption := "" oItems7 := oitem9:Items() oitem10 := oItems7:Add("",2) oitem10:GroupPopup := 3/*exNoGroupPopupFrame+exGroupPopup*/ oItems8 := oitem10:Items() oitem11 := oItems8:Add("Button1",2) oitem11:ShowAsButton := 275/*exShowAsSelectButtonBottom+exShowAsButtonAutoSize*/ oItems9 := oitem11:Items() oItems9:Add("Item 1") oItems9:Add("Item 2") oItems9:Add("Item 3") oItems8:Add("",0,0):Padding := "4,0,0,0" oitem12 := oItems8:Add("Button2",2) oitem12:ShowAsButton := 275/*exShowAsSelectButtonBottom+exShowAsButtonAutoSize*/ oItems10 := oitem12:Items() oItems10:Add("Item 4") oItems10:Add("Item 5") oItems10:Add("Item 6") oitem13 := oItems7:Add("Popup",2) oitem13:Alignment := 1/*exCenter*/ oItems11 := oitem13:Items() oItems11:Add("Item 7"):Check := .T. oItems11:Add("Item 8") oItems12 := oItems11:Add("Item 9",2):Items() oItems12:Add("Item 10") oItems12:Add("Item 11") oItems12:Add("Item 12") var_item4 := oItems1:Add("New Page") var_item4:ToString := "[id=0][typ=2][chk=0][spchk=-1][show=1][grp=10][bghot=0x12000000][bgsel=0x11000000][bgselhot=0x14000000][group=0x03][tab=9000][pad=4,0,4,0][popupoffset=-4,-1]([id=0][group=0x03])" var_item4:ID := 300 var_item4:Caption := "Page2" oItems13 := var_item4:Items() oitem14 := oItems13:Add("S1") oitem14:ItemHeight := 88 oitem14:AllowEdit := 1540/*exItemEditVertical+exItemEditSpin+exItemEditProgress*/ oitem14:EditValue := 25 oitem15 := oItems13:Add("S2") oitem15:ItemHeight := 88 oitem15:AllowEdit := 1540/*exItemEditVertical+exItemEditSpin+exItemEditProgress*/ oitem15:EditValue := 50 oitem16 := oItems13:Add("S3") oitem16:ItemHeight := 88 oitem16:AllowEdit := 1540/*exItemEditVertical+exItemEditSpin+exItemEditProgress*/ oitem16:EditValue := 75 oItems1:Add("",0,0):Padding := "8,0,0,0" oAppearance := oExContextMenu:VisualAppearance() oAppearance:Add(1,"C:/Program Files/Exontrol/ExContextMenu/Sample/EBN/MSPaint-Ribbon/mspr_background.ebn") oAppearance:Add(2,"C:/Program Files/Exontrol/ExContextMenu/Sample/EBN/MSPaint-Ribbon/mspr_groupt.ebn") oAppearance:Add(3,"C:/Program Files/Exontrol/ExContextMenu/Sample/EBN/MSPaint-Ribbon/mspr_groupo.ebn") oAppearance:Add(4,"C:/Program Files/Exontrol/ExContextMenu/Sample/EBN/MSPaint-Ribbon/mspr_grouphot.ebn") oAppearance:Add(5,"C:/Program Files/Exontrol/ExContextMenu/Sample/EBN/MSPaint-Ribbon/mspr_frameh.ebn") oAppearance:Add(6,"C:/Program Files/Exontrol/ExContextMenu/Sample/EBN/MSPaint-Ribbon/mspr_framehs.ebn") oAppearance:Add(7,"C:/Program Files/Exontrol/ExContextMenu/Sample/EBN/MSPaint-Ribbon/mspr_framehi.ebn") oAppearance:Add(8,"C:/Program Files/Exontrol/ExContextMenu/Sample/EBN/MSPaint-Ribbon/mspr_framehe.ebn") oAppearance:Add(9,"C:/Program Files/Exontrol/ExContextMenu/Sample/EBN/MSPaint-Ribbon/mspr_framevs.ebn") oAppearance:Add(10,"C:/Program Files/Exontrol/ExContextMenu/Sample/EBN/MSPaint-Ribbon/mspr_framevi.ebn") oAppearance:Add(11,"C:/Program Files/Exontrol/ExContextMenu/Sample/EBN/MSPaint-Ribbon/mspr_frameve.ebn") oAppearance:Add(12,"C:/Program Files/Exontrol/ExContextMenu/Sample/EBN/MSPaint-Ribbon/mspr_select.ebn") oAppearance:Add(13,"C:/Program Files/Exontrol/ExContextMenu/Sample/EBN/MSPaint-Ribbon/mspr_bordert.ebn") oAppearance:Add(14,"C:/Program Files/Exontrol/ExContextMenu/Sample/EBN/MSPaint-Ribbon/mspr_buttond.ebn") oAppearance:Add(15,"C:/Program Files/Exontrol/ExContextMenu/Sample/EBN/MSPaint-Ribbon/mspr_buttonu.ebn") oAppearance:Add(16,"C:/Program Files/Exontrol/ExContextMenu/Sample/EBN/MSPaint-Ribbon/mspr_tab.ebn") oAppearance:Add(17,"CP:16 0 0 0 1") oAppearance:Add(18,"C:/Program Files/Exontrol/ExContextMenu/Sample/EBN/MSPaint-Ribbon/mspr_tabhot.ebn") oAppearance:Add(19,"C:/Program Files/Exontrol/ExContextMenu/Sample/EBN/MSPaint-Ribbon/mspr_tabselhot.ebn") oAppearance:Add(20,"CP:19 0 0 0 1") oExContextMenu:LocalAppearance := 6/*ShadowBorder*/ oExContextMenu:Appearance := 16777216/*0x1000000+*/ oExContextMenu:SetProperty("ForeColor",AutomationTranslateColor( GraMakeRGBColor ( { 21,66,139 } ) , .F. )) oExContextMenu:SetProperty("SelBackColor",0xe000000) oExContextMenu:SetProperty("Background",64/*exToolTipAppearance*/,oExContextMenu:Appearance()) oExContextMenu:SetProperty("Background",2/*0x2+*/,0xd000000) oExContextMenu:SetProperty("Background",105/*exGroupPopupFrameSingle*/,0x5000000) oExContextMenu:SetProperty("Background",106/*exGroupPopupFrameHStart*/,0x6000000) oExContextMenu:SetProperty("Background",107/*exGroupPopupFrameHIntermediate*/,0x7000000) oExContextMenu:SetProperty("Background",108/*exGroupPopupFrameHEnd*/,0x8000000) oExContextMenu:SetProperty("Background",116/*exGroupPopupFrameVStart*/,0x9000000) oExContextMenu:SetProperty("Background",117/*exGroupPopupFrameVIntermediate*/,0xa000000) oExContextMenu:SetProperty("Background",118/*exGroupPopupFrameVEnd*/,0xb000000) oExContextMenu:SetProperty("Background",110/*exMenuHotBackColor*/,0xc000000) oExContextMenu:SetProperty("Background",112/*exMenuSelHotBackColor*/,0xf000000) oExContextMenu:Select() oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |
166 |
Microsoft Office - Ribbon Like
#include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oExContextMenu LOCAL oAppearance LOCAL oitem,oitem1,oitem10,oitem11,oitem12,oitem13,oitem14,oitem15,oitem16,oitem2,oitem3,oitem4,oitem5,oitem6,oitem7,oitem8,oitem9,var_item,var_item1,var_item2,var_item3,var_item4 LOCAL oItems,oItems1,oItems10,oItems11,oItems12,oItems13,oItems2,oItems3,oItems4,oItems5,oItems6,oItems7,oItems8,oItems9 oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oExContextMenu := XbpActiveXControl():new( oForm:drawingArea ) oExContextMenu:CLSID := "Exontrol.ContextMenu.1" /*{2DFBF6CB-9198-4576-AB91-EE6445C1F3E0}*/ oExContextMenu:create(,, {10,60},{610,370} ) oExContextMenu:MenuAppearance := 0/*exMenuNormal*/ oItems := oExContextMenu:Items() oItems:ToString := "[id=0][group=0x03](),[id=-20][bg=0x01000000][group=0x03][itemspad=4,4,4,4]([id=9000])" oItems1 := oItems:item(0):Items() oItems1:Add("",0,0):Padding := "8,0,0,0" var_item3 := oItems1:Add("New Page") var_item3:ToString := "[id=0][typ=2][chk=1][spchk=-1][show=1][grp=10][bghot=0x12000000][bgsel=0x11000000][bgselhot=0x14000000][group=0x03][tab=9000][pad=4,0,4,0][popupoffset=-4,-1]([id=0][group=0x03])" var_item3:ID := 200 var_item3:Caption := "Page1" var_item := var_item3:Items:Add("New Group") var_item:ToString := "[id=0][group=0x03][itemspad=4,4,4,18][itemsbg=0x02000000][itemsbghot=0x04000000]()" var_item:Caption := "<b><font ;14>A" oItems2 := var_item:Items() oItems2:BackgroundExt := "bottom[16,text=`<fgcolor A0A0A0><font ;8>Horizontal`,align=0x11]" oitem := oItems2:Add("",2) oitem:GroupPopup := 17/*exGroupPopupEqualWidth+exGroupPopup*/ oitem:Caption := "" oItems3 := oitem:Items() oitem1 := oItems3:Add("R1") oitem1:RadioGroup := 100 oitem1:Radio := .T. oitem1:ShowCheckedAsSelected := 1/*exDisplayItemHighlight*/ oitem1:Checked := .F. oitem2 := oItems3:Add("R2") oitem2:RadioGroup := 100 oitem2:Radio := .T. oitem2:ShowCheckedAsSelected := 1/*exDisplayItemHighlight*/ oitem2:Checked := .T. oitem3 := oItems3:Add("R3") oitem3:RadioGroup := 100 oitem3:Radio := .T. oitem3:ShowCheckedAsSelected := 1/*exDisplayItemHighlight*/ oitem3:Checked := .F. var_item1 := var_item3:Items:Add("New Group") var_item1:ToString := "[id=0][group=0x03][itemspad=4,4,4,18][itemsbg=0x02000000][itemsbghot=0x04000000]()" var_item1:Caption := "<b><font ;14>B" oItems4 := var_item1:Items() oItems4:BackgroundExt := "bottom[16,text=`<fgcolor A0A0A0><font ;8>Vertical`,align=0x11]" oitem4 := oItems4:Add("",2) oitem4:GroupPopup := 289/*exGroupPopupVertical+exGroupPopupEqualHeight+exGroupPopup*/ oitem4:Caption := "" oItems5 := oitem4:Items() oitem5 := oItems5:Add("C1") oitem5:Check := .T. oitem5:Checked := .T. oitem6 := oItems5:Add("C2") oitem6:Check := .T. oitem6:Checked := .F. oitem7 := oItems5:Add("C3") oitem7:Check := .T. oitem7:Checked := .T. var_item3:Items():Add("",0,0):Padding := "4,0,0,0" var_item2 := var_item3:Items:Add("New Group") var_item2:ToString := "[id=0][group=0x03][itemspad=4,4,4,18][itemsbg=0x02000000][itemsbghot=0x04000000]()" var_item2:Caption := "" oItems6 := var_item2:Items() oItems6:BackgroundExt := "bottom[16,text=`<fgcolor A0A0A0><font ;8>Mixt`,align=0x11]" oitem8 := oItems6:Add("",0) oitem8:AllowEdit := 1027/*exItemEditVertical+exItemEditSlider*/ oitem8:ItemHeight := 76 oitem8:EditBorder := 0/*exEditBorderNone*/ oitem8:EditValue := 25 oitem9 := oItems6:Add("",2) oitem9:GroupPopup := 259/*exGroupPopupVertical+exNoGroupPopupFrame+exGroupPopup*/ oitem9:Caption := "" oItems7 := oitem9:Items() oitem10 := oItems7:Add("",2) oitem10:GroupPopup := 3/*exNoGroupPopupFrame+exGroupPopup*/ oItems8 := oitem10:Items() oitem11 := oItems8:Add("Button1",2) oitem11:ShowAsButton := 275/*exShowAsSelectButtonBottom+exShowAsButtonAutoSize*/ oItems9 := oitem11:Items() oItems9:Add("Item 1") oItems9:Add("Item 2") oItems9:Add("Item 3") oItems8:Add("",0,0):Padding := "4,0,0,0" oitem12 := oItems8:Add("Button2",2) oitem12:ShowAsButton := 275/*exShowAsSelectButtonBottom+exShowAsButtonAutoSize*/ oItems10 := oitem12:Items() oItems10:Add("Item 4") oItems10:Add("Item 5") oItems10:Add("Item 6") oitem13 := oItems7:Add("Popup",2) oitem13:Alignment := 1/*exCenter*/ oItems11 := oitem13:Items() oItems11:Add("Item 7"):Check := .T. oItems11:Add("Item 8") oItems12 := oItems11:Add("Item 9",2):Items() oItems12:Add("Item 10") oItems12:Add("Item 11") oItems12:Add("Item 12") var_item4 := oItems1:Add("New Page") var_item4:ToString := "[id=0][typ=2][chk=0][spchk=-1][show=1][grp=10][bghot=0x12000000][bgsel=0x11000000][bgselhot=0x14000000][group=0x03][tab=9000][pad=4,0,4,0][popupoffset=-4,-1]([id=0][group=0x03])" var_item4:ID := 300 var_item4:Caption := "Page2" oItems13 := var_item4:Items() oitem14 := oItems13:Add("S1") oitem14:ItemHeight := 88 oitem14:AllowEdit := 1540/*exItemEditVertical+exItemEditSpin+exItemEditProgress*/ oitem14:EditValue := 25 oitem15 := oItems13:Add("S2") oitem15:ItemHeight := 88 oitem15:AllowEdit := 1540/*exItemEditVertical+exItemEditSpin+exItemEditProgress*/ oitem15:EditValue := 50 oitem16 := oItems13:Add("S3") oitem16:ItemHeight := 88 oitem16:AllowEdit := 1540/*exItemEditVertical+exItemEditSpin+exItemEditProgress*/ oitem16:EditValue := 75 oItems1:Add("",0,0):Padding := "8,0,0,0" oAppearance := oExContextMenu:VisualAppearance() oAppearance:Add(1,"C:\Program Files\Exontrol\ExContextMenu\Sample\EBN\MSOffice-Ribbon\msor_background.ebn") oAppearance:Add(2,"C:\Program Files\Exontrol\ExContextMenu\Sample\EBN\MSOffice-Ribbon\msor_groupt.ebn") oAppearance:Add(3,"C:\Program Files\Exontrol\ExContextMenu\Sample\EBN\MSOffice-Ribbon\msor_groupo.ebn") oAppearance:Add(4,"C:\Program Files\Exontrol\ExContextMenu\Sample\EBN\MSOffice-Ribbon\msor_grouphot.ebn") oAppearance:Add(5,"C:\Program Files\Exontrol\ExContextMenu\Sample\EBN\MSOffice-Ribbon\msor_frameh.ebn") oAppearance:Add(6,"C:\Program Files\Exontrol\ExContextMenu\Sample\EBN\MSOffice-Ribbon\msor_framehs.ebn") oAppearance:Add(7,"C:\Program Files\Exontrol\ExContextMenu\Sample\EBN\MSOffice-Ribbon\msor_framehi.ebn") oAppearance:Add(8,"C:\Program Files\Exontrol\ExContextMenu\Sample\EBN\MSOffice-Ribbon\msor_framehe.ebn") oAppearance:Add(9,"C:\Program Files\Exontrol\ExContextMenu\Sample\EBN\MSOffice-Ribbon\msor_framevs.ebn") oAppearance:Add(10,"C:\Program Files\Exontrol\ExContextMenu\Sample\EBN\MSOffice-Ribbon\msor_framevi.ebn") oAppearance:Add(11,"C:\Program Files\Exontrol\ExContextMenu\Sample\EBN\MSOffice-Ribbon\msor_frameve.ebn") oAppearance:Add(12,"C:\Program Files\Exontrol\ExContextMenu\Sample\EBN\MSOffice-Ribbon\msor_select.ebn") oAppearance:Add(13,"C:\Program Files\Exontrol\ExContextMenu\Sample\EBN\MSOffice-Ribbon\msor_bordert.ebn") oAppearance:Add(14,"C:\Program Files\Exontrol\ExContextMenu\Sample\EBN\MSOffice-Ribbon\msor_buttond.ebn") oAppearance:Add(15,"C:\Program Files\Exontrol\ExContextMenu\Sample\EBN\MSOffice-Ribbon\msor_buttonu.ebn") oAppearance:Add(16,"C:\Program Files\Exontrol\ExContextMenu\Sample\EBN\MSOffice-Ribbon\msor_tab.ebn") oAppearance:Add(17,"CP:16 0 0 0 1") oAppearance:Add(18,"C:\Program Files\Exontrol\ExContextMenu\Sample\EBN\MSOffice-Ribbon\msor_tabhot.ebn") oAppearance:Add(19,"C:\Program Files\Exontrol\ExContextMenu\Sample\EBN\MSOffice-Ribbon\msor_tabselhot.ebn") oAppearance:Add(20,"CP:19 0 0 0 1") oExContextMenu:SetProperty("ForeColor",AutomationTranslateColor( GraMakeRGBColor ( { 21,66,139 } ) , .F. )) oExContextMenu:SetProperty("SelBackColor",0xe000000) oExContextMenu:LocalAppearance := 6/*ShadowBorder*/ oExContextMenu:Appearance := 16777216/*0x1000000+*/ oExContextMenu:SetProperty("Background",64/*exToolTipAppearance*/,oExContextMenu:Appearance()) oExContextMenu:SetProperty("Background",2/*0x2+*/,0xd000000) oExContextMenu:SetProperty("Background",105/*exGroupPopupFrameSingle*/,0x5000000) oExContextMenu:SetProperty("Background",106/*exGroupPopupFrameHStart*/,0x6000000) oExContextMenu:SetProperty("Background",107/*exGroupPopupFrameHIntermediate*/,0x7000000) oExContextMenu:SetProperty("Background",108/*exGroupPopupFrameHEnd*/,0x8000000) oExContextMenu:SetProperty("Background",116/*exGroupPopupFrameVStart*/,0x9000000) oExContextMenu:SetProperty("Background",117/*exGroupPopupFrameVIntermediate*/,0xa000000) oExContextMenu:SetProperty("Background",118/*exGroupPopupFrameVEnd*/,0xb000000) oExContextMenu:SetProperty("Background",110/*exMenuHotBackColor*/,0xc000000) oExContextMenu:SetProperty("Background",112/*exMenuSelHotBackColor*/,0xf000000) oExContextMenu:Select() oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |
165 |
How I can assign buttons to a tab
#include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oExContextMenu LOCAL oitem,oitem1 LOCAL oItems,oItems1,oItems2,oItems3 oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oExContextMenu := XbpActiveXControl():new( oForm:drawingArea ) oExContextMenu:CLSID := "Exontrol.ContextMenu.1" /*{2DFBF6CB-9198-4576-AB91-EE6445C1F3E0}*/ oExContextMenu:create(,, {10,60},{610,370} ) oExContextMenu:SetProperty("Background",102/*exMenuSelBorderColor*/,AutomationTranslateColor( GraMakeRGBColor ( { 240,240,240 } ) , .F. )) oItems := oExContextMenu:Items() oItems:ToString := "[id=0][group=0x0103][itemspad=4,4,4,4]([id=-10][group=0x03](),[id=0][bg=RGB(240,240,240)][group=0x03][itemspad=4,4,4,4]([id=-100]))" oItems1 := oItems:item(-10):Items() oItems1:Add("",0,0):Padding := "8,0,0,0" oitem := oItems1:Add("New Page") oitem:ToString := "[typ=2][chk=1][spchk=-1][show=1][grp=10][bghot=RGB(255,255,255)][bgsel=RGB(240,240,240)][bgselhot=RGB(240,240,240)][height=16][group=0x03][tab=-100][pad=2,0,2,0]([id=50][group=0x03]([]))" oitem:Caption := "Page<off -5><font ;5><b>1</b></font></off>" oItems2 := oitem:Items() oItems2:Add("Button 1"):ShowAsButton := 3/*exShowAsButtonAutoSize+exShowAsButton*/ oItems2:Add("Button 2"):ShowAsButton := 3/*exShowAsButtonAutoSize+exShowAsButton*/ oItems2:Add("Button 3"):ShowAsButton := 3/*exShowAsButtonAutoSize+exShowAsButton*/ oitem1 := oItems1:Add("New Page") oitem1:ToString := "[typ=2][chk=0][spchk=-1][show=1][grp=10][bghot=RGB(255,255,255)][bgsel=RGB(240,240,240)][bgselhot=RGB(240,240,240)][height=16][group=0x03][tab=-100][pad=2,0,2,0]([id=50][group=0x03]([]))" oitem1:Caption := "Page<off -5><font ;5><b>2</b></font></off>" oItems3 := oitem1:Items() oItems3:Add("Button 3"):ShowAsButton := 3/*exShowAsButtonAutoSize+exShowAsButton*/ oItems3:Add("Button 4"):ShowAsButton := 3/*exShowAsButtonAutoSize+exShowAsButton*/ oItems1:Add("",0,0):Padding := "8,0,0,0" oExContextMenu:Select() oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |
164 |
How can I hide an item
#include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oExContextMenu LOCAL oItems oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oExContextMenu := XbpActiveXControl():new( oForm:drawingArea ) oExContextMenu:CLSID := "Exontrol.ContextMenu.1" /*{2DFBF6CB-9198-4576-AB91-EE6445C1F3E0}*/ oExContextMenu:create(,, {10,60},{610,370} ) oItems := oExContextMenu:Items() oItems:Add("Item 1"):Visible := .F. oItems:Add("Item 2") oExContextMenu:Select() oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |
163 |
How do I get the item giving its caption
#include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oExContextMenu LOCAL oItems oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oExContextMenu := XbpActiveXControl():new( oForm:drawingArea ) oExContextMenu:CLSID := "Exontrol.ContextMenu.1" /*{2DFBF6CB-9198-4576-AB91-EE6445C1F3E0}*/ oExContextMenu:create(,, {10,60},{610,370} ) oItems := oExContextMenu:Items() oItems:Add("Item 1"):ID := 1000 oItems:Add("Item 2"):ID := 1001 oExContextMenu:item("Item 1"):Bold := .T. oExContextMenu:Select() oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |
162 |
How do I get the item giving its identifier
#include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oExContextMenu LOCAL oItems oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oExContextMenu := XbpActiveXControl():new( oForm:drawingArea ) oExContextMenu:CLSID := "Exontrol.ContextMenu.1" /*{2DFBF6CB-9198-4576-AB91-EE6445C1F3E0}*/ oExContextMenu:create(,, {10,60},{610,370} ) oItems := oExContextMenu:Items() oItems:Add("Item 1"):ID := 1000 oItems:Add("Item 2"):ID := 1001 oExContextMenu:item(1000):Bold := .T. oExContextMenu:Select() oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |
161 |
Can I change the cursor where it hovers the item
#include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oExContextMenu LOCAL oItems oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oExContextMenu := XbpActiveXControl():new( oForm:drawingArea ) oExContextMenu:CLSID := "Exontrol.ContextMenu.1" /*{2DFBF6CB-9198-4576-AB91-EE6445C1F3E0}*/ oExContextMenu:create(,, {10,60},{610,370} ) oExContextMenu:Cursor := "exCross" oItems := oExContextMenu:Items() oItems:Add("Item 1") oItems:Add("Item 2"):Cursor := "exNoDrop" oExContextMenu:Select() oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |
160 |
I am using radio-buttons, the question is it possible to uncheck the radio-buttons, so no button is pressed in the group
|
159 |
Is it possible to display the item's identifiers
|
158 |
How do I disable showing the tooltip for all control (method 2)
|
157 |
How can I disable the control
#include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oExContextMenu LOCAL oItems oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oExContextMenu := XbpActiveXControl():new( oForm:drawingArea ) oExContextMenu:CLSID := "Exontrol.ContextMenu.1" /*{2DFBF6CB-9198-4576-AB91-EE6445C1F3E0}*/ oExContextMenu:create(,, {10,60},{610,370} ) oItems := oExContextMenu:Items() oItems:Add("Item 1"):Enabled := .F. oItems:Add("Item 2"):Enabled := .F. oItems:Add("Item 3"):Enabled := .F. oExContextMenu:Select() oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |
156 |
How can I specify a different border/visual appearance for drop down portion of the select buttons/combobox (ebn)
#include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oExContextMenu LOCAL oitem,oitem1,oitem2 LOCAL oItems,oItems1,oItems2,oItems3 oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oExContextMenu := XbpActiveXControl():new( oForm:drawingArea ) oExContextMenu:CLSID := "Exontrol.ContextMenu.1" /*{2DFBF6CB-9198-4576-AB91-EE6445C1F3E0}*/ oExContextMenu:create(,, {10,60},{610,370} ) oExContextMenu:VisualAppearance():Add(1,"c:\exontrol\images\normal.ebn") oExContextMenu:LocalAppearance := 16777216/*0x1000000+*/ oItems := oExContextMenu:Items() oitem := oItems:Add("",2) oitem:GroupPopup := 3/*exNoGroupPopupFrame+exGroupPopup*/ oItems1 := oitem:Items() oitem1 := oItems1:Add("Button",2) oitem1:ShowAsButton := 275/*exShowAsSelectButtonBottom+exShowAsButtonAutoSize*/ oItems2 := oitem1:Items() oItems2:Add("Item 1") oItems2:Add("Item 2") oItems2:Add("Item 3") oitem2 := oItems1:Add("Button",2) oitem2:ShowAsButton := 275/*exShowAsSelectButtonBottom+exShowAsButtonAutoSize*/ oItems3 := oitem2:Items() oItems3:Add("Item 4") oItems3:Add("Item 5") oItems3:Add("Item 6") oExContextMenu:Select() oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |
155 |
How can I specify a different border for drop down portion of the select buttons/combobox
|
154 |
How can I change the visual appearance for the entire control
#include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oExContextMenu LOCAL oitem LOCAL oItems oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oExContextMenu := XbpActiveXControl():new( oForm:drawingArea ) oExContextMenu:CLSID := "Exontrol.ContextMenu.1" /*{2DFBF6CB-9198-4576-AB91-EE6445C1F3E0}*/ oExContextMenu:create(,, {10,60},{610,370} ) oExContextMenu:VisualAppearance():Add(1,"c:\exontrol\images\normal.ebn") oExContextMenu:Appearance := 16777216/*0x1000000+*/ oExContextMenu:ShowCheckedAsSelected := -1/*exDisplayItemCheckHighlight*/ oItems := oExContextMenu:Items() oItems:Padding := "4,4,4,4" oitem := oItems:Add("Radio 1") oitem:Radio := .T. oitem:Checked := .T. oItems:Add("Radio 2"):Radio := .T. oItems:Add("Radio 3"):Radio := .T. oExContextMenu:Select() oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |
153 |
How can I show a border arround the control
|
152 |
Is it possible to change the item's background color when check/uncheck the item
|
151 |
How can I change the colors for hot/hover items
#include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oExContextMenu LOCAL oitem,oitem1 LOCAL oItems oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oExContextMenu := XbpActiveXControl():new( oForm:drawingArea ) oExContextMenu:CLSID := "Exontrol.ContextMenu.1" /*{2DFBF6CB-9198-4576-AB91-EE6445C1F3E0}*/ oExContextMenu:create(,, {10,60},{610,370} ) oExContextMenu:SetProperty("Background",110/*exMenuHotBackColor*/,AutomationTranslateColor( GraMakeRGBColor ( { 0,0,1 } ) , .F. )) oExContextMenu:SetProperty("Background",111/*exMenuHotForeColor*/,AutomationTranslateColor( GraMakeRGBColor ( { 255,255,255 } ) , .F. )) oExContextMenu:SetProperty("Background",112/*exMenuSelHotBackColor*/,AutomationTranslateColor( GraMakeRGBColor ( { 128,128,128 } ) , .F. )) oExContextMenu:SetProperty("Background",113/*exMenuSelHotForeColor*/,AutomationTranslateColor( GraMakeRGBColor ( { 255,255,255 } ) , .F. )) oExContextMenu:SetProperty("SelBackColor",AutomationTranslateColor( GraMakeRGBColor ( { 128,128,128 } ) , .F. )) oExContextMenu:SetProperty("SelForeColor",AutomationTranslateColor( GraMakeRGBColor ( { 255,255,255 } ) , .F. )) oExContextMenu:SetProperty("Background",102/*exMenuSelBorderColor*/,AutomationTranslateColor( GraMakeRGBColor ( { 128,128,128 } ) , .F. )) oExContextMenu:ShowCheckedAsSelected := -1/*exDisplayItemCheckHighlight*/ oItems := oExContextMenu:Items() oItems:Padding := "4,4,4,4" oItems:Add(""):ToString := "[group=3](Item 1,Item 2)" oitem := oItems:Add("Check 1") oitem:Checked := .T. oitem:Check := .T. oitem1 := oItems:Add("Check 2") oitem1:Check := .T. oExContextMenu:Select() oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |
150 |
How do I change the visual appearance of the groups (vertical)
#include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oExContextMenu LOCAL oAppearance LOCAL oitem,oitem1,oitem2 LOCAL oItems,oItems1,oItems2,oItems3 oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oExContextMenu := XbpActiveXControl():new( oForm:drawingArea ) oExContextMenu:CLSID := "Exontrol.ContextMenu.1" /*{2DFBF6CB-9198-4576-AB91-EE6445C1F3E0}*/ oExContextMenu:create(,, {10,60},{610,370} ) oAppearance := oExContextMenu:VisualAppearance() oAppearance:Add(1,"c:\exontrol\images\normal.ebn") oAppearance:Add(2,"c:\exontrol\images\pushed.ebn") oAppearance:Add(3,"c:\exontrol\images\hot.ebn") oExContextMenu:SetProperty("Background",105/*exGroupPopupFrameSingle*/,0x1000000) oExContextMenu:SetProperty("Background",116/*exGroupPopupFrameVStart*/,0x1000000) oExContextMenu:SetProperty("Background",117/*exGroupPopupFrameVIntermediate*/,0x2000000) oExContextMenu:SetProperty("Background",118/*exGroupPopupFrameVEnd*/,0x3000000) oExContextMenu:SetProperty("Background",109/*exGroupPopupFrameSolid*/,AutomationTranslateColor( GraMakeRGBColor ( { 255,0,0 } ) , .F. )) oItems := oExContextMenu:Items() oitem := oItems:Add("",2) oitem:GroupPopup := 3/*exNoGroupPopupFrame+exGroupPopup*/ oItems1 := oitem:Items() oitem1 := oItems1:Add("Vertical",2) oitem1:Alignment := 1/*exCenter*/ oitem1:GroupPopup := 257/*exGroupPopupVertical+exGroupPopup*/ oItems2 := oitem1:Items() oItems2:Add("Item 1") oItems2:Add("Item 2") oItems2:Add("Item 3") oItems2:Add("Item 4") oItems2:Add("Item 5") oItems1:Add(""):CaptionWidth := 12 oitem2 := oItems1:Add("Vertical",2) oitem2:Alignment := 1/*exCenter*/ oitem2:GroupPopup := 449/*exGroupPopupVertical+exGroupPopupFrameThickBox+exGroupPopupFrameSolidBox+exGroupPopup*/ oItems3 := oitem2:Items() oItems3:Add("Item 1") oItems3:Add("Item 2") oItems3:Add("Item 3") oItems3:Add("Item 4") oItems3:Add("Item 5") oExContextMenu:Select() oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |
149 |
How do I change the visual appearance of the groups (horizontal)
#include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oExContextMenu LOCAL oAppearance LOCAL oitem LOCAL oItems,oItems1 oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oExContextMenu := XbpActiveXControl():new( oForm:drawingArea ) oExContextMenu:CLSID := "Exontrol.ContextMenu.1" /*{2DFBF6CB-9198-4576-AB91-EE6445C1F3E0}*/ oExContextMenu:create(,, {10,60},{610,370} ) oAppearance := oExContextMenu:VisualAppearance() oAppearance:Add(1,"c:\exontrol\images\normal.ebn") oAppearance:Add(2,"c:\exontrol\images\pushed.ebn") oAppearance:Add(3,"c:\exontrol\images\hot.ebn") oExContextMenu:SetProperty("Background",105/*exGroupPopupFrameSingle*/,0x1000000) oExContextMenu:SetProperty("Background",106/*exGroupPopupFrameHStart*/,0x1000000) oExContextMenu:SetProperty("Background",107/*exGroupPopupFrameHIntermediate*/,0x2000000) oExContextMenu:SetProperty("Background",108/*exGroupPopupFrameHEnd*/,0x3000000) oExContextMenu:SetProperty("Background",109/*exGroupPopupFrameSolid*/,AutomationTranslateColor( GraMakeRGBColor ( { 255,0,0 } ) , .F. )) oItems := oExContextMenu:Items() oitem := oItems:Add("Horizontal Group",2) oitem:GroupPopup := 1/*exGroupPopup*/ oItems1 := oitem:Items() oItems1:Add("Item 1") oItems1:Add("Item 2") oItems1:Add("Item 3") oItems1:Add("Item 4") oItems1:Add("Item 5") oItems:Add(""):ToString := "Horizontal Group[group=193](Item 1,Item 2,Item 3,Item 4,Item 5)" oExContextMenu:Select() oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |
148 |
How can I change the visual appearance of the separator item
|
147 |
How can I change the visual appearance of the flat portion of the drop down of the control
#include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oExContextMenu LOCAL oItems,oItems1 oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oExContextMenu := XbpActiveXControl():new( oForm:drawingArea ) oExContextMenu:CLSID := "Exontrol.ContextMenu.1" /*{2DFBF6CB-9198-4576-AB91-EE6445C1F3E0}*/ oExContextMenu:create(,, {10,60},{610,370} ) oExContextMenu:VisualAppearance():Add(1,"c:\exontrol\images\normal.ebn") oExContextMenu:SetProperty("FlatBackColor",0x1000000) oExContextMenu:SetProperty("Background",100/*exMenuFlatLineColor*/,oExContextMenu:FlatBackColor()) oItems := oExContextMenu:Items() oItems1 := oItems:Add("Popup",2):Items() oItems1:Add("Item 1"):Check := .T. oItems1:Add("Item 2"):Check := .T. oItems1:Add("Item 3"):Check := .T. oExContextMenu:Select() oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |
146 |
How can I change the visual appearance of the radio-buttons to be displayed in the context menu (ebn)
|
145 |
How can I change the visual appearance of the check-boxes to be displayed in the context menu (ebn)
|
144 |
How can I change the visual appearance of the tooltips to be displayed in the context menu (ebn)
|
143 |
Is it possible to change the visual appearance of the buttons to be displayed in the context menu (ebn)
|
142 |
I've seen that the width of the tooltip is variable. Can I make it larger
|
141 |
How do I disable showing the tooltip for all control (method 1)
|
140 |
How do I let the tooltip being displayed longer
|
139 |
How do I show the tooltip quicker
|
138 |
How can I get the version of the control I am running
|
137 |
How can I align the picture on the control's background
|
136 |
Is it possible to place a picture on the control's background
|
135 |
How can I display the item using a different font/size
#include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oExContextMenu LOCAL oItems oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oExContextMenu := XbpActiveXControl():new( oForm:drawingArea ) oExContextMenu:CLSID := "Exontrol.ContextMenu.1" /*{2DFBF6CB-9198-4576-AB91-EE6445C1F3E0}*/ oExContextMenu:create(,, {10,60},{610,370} ) oItems := oExContextMenu:Items() oItems:Add(""):Caption := "<font ;14>This is a bit of text" oItems:Add("<font ;6>This is a bit of text") oItems:Add(""):Caption := "<font Times New Roman;22>This is a bit of text</font>. Default" oExContextMenu:Select() oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |
134 |
How can I use the Event event, available for /COM version
PROCEDURE OnEvent(oExContextMenu,EventID) DevOut( "Event" ) DevOut( Transform(oExContextMenu:EventParam(-2),"") ) RETURN #include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oExContextMenu LOCAL oitem LOCAL oItems oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oExContextMenu := XbpActiveXControl():new( oForm:drawingArea ) oExContextMenu:CLSID := "Exontrol.ContextMenu.1" /*{2DFBF6CB-9198-4576-AB91-EE6445C1F3E0}*/ oExContextMenu:create(,, {10,60},{610,370} ) oExContextMenu:Event := {|EventID| OnEvent(oExContextMenu,EventID)} /*Notifies the application once the control fires an event.*/ oItems := oExContextMenu:Items() oItems:Add("Check"):Check := .T. oitem := oItems:Add("Slider") oitem:AllowEdit := 3/*exItemEditSlider*/ oitem:EditWidth := 128 oitem:EditBorder := 0/*exEditBorderNone*/ oitem:EditValue := 25 oExContextMenu:Select() oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |
133 |
Is it possible to get notified once the user edits the field, or change the slider value
|
132 |
How do I get notified once I uncheck an item
|
131 |
How do I get notified once I check an item
|
130 |
How do I get notified once I click/select an item
|
129 |
Does your control support padding for items
|
128 |
How can I change the visual appearance for items, when cursor hovers it (hot,EBN)
|
127 |
How can I change the background color for items, when cursor hovers it (hot)
#include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oExContextMenu LOCAL oitem LOCAL oItems,oItems1 oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oExContextMenu := XbpActiveXControl():new( oForm:drawingArea ) oExContextMenu:CLSID := "Exontrol.ContextMenu.1" /*{2DFBF6CB-9198-4576-AB91-EE6445C1F3E0}*/ oExContextMenu:create(,, {10,60},{610,370} ) oItems := oExContextMenu:Items() oitem := oItems:Add("",2) oitem:GroupPopup := 3/*exNoGroupPopupFrame+exGroupPopup*/ oItems1 := oitem:Items() oItems1:SetProperty("HotBackColor",AutomationTranslateColor( GraMakeRGBColor ( { 255,0,0 } ) , .F. )) oItems1:Padding := "0,8,0,8" oItems1:Add("Item 1") oItems1:Add("Item 2") oItems1:Add("Item 3") oItems:Add(""):ToString := "[group=0x03][itemspad=0,8,0,8][itemsbghot=RGB(255,0,0)](Item 1,Item 2,Item 3)" oExContextMenu:Select() oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |
126 |
How can I change the visual appearance for items (EBN)
|
125 |
How can I change the background color for items
#include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oExContextMenu LOCAL oitem LOCAL oItems,oItems1 oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oExContextMenu := XbpActiveXControl():new( oForm:drawingArea ) oExContextMenu:CLSID := "Exontrol.ContextMenu.1" /*{2DFBF6CB-9198-4576-AB91-EE6445C1F3E0}*/ oExContextMenu:create(,, {10,60},{610,370} ) oItems := oExContextMenu:Items() oitem := oItems:Add("",2) oitem:GroupPopup := 3/*exNoGroupPopupFrame+exGroupPopup*/ oItems1 := oitem:Items() oItems1:SetProperty("BackColor",AutomationTranslateColor( GraMakeRGBColor ( { 255,0,0 } ) , .F. )) oItems1:Padding := "0,8,0,8" oItems1:Add("Item 1") oItems1:Add("Item 2") oItems1:Add("Item 3") oItems:Add(""):ToString := "[group=0x03][itemspad=0,8,0,8][itemsbg=RGB(255,0,0)](Item 1,Item 2,Item 3)" oExContextMenu:Select() oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |
124 |
How do I hide the left gray portion to be shown on the drop down menu/popup (method 2)
#include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oExContextMenu LOCAL oItems,oItems1 oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oExContextMenu := XbpActiveXControl():new( oForm:drawingArea ) oExContextMenu:CLSID := "Exontrol.ContextMenu.1" /*{2DFBF6CB-9198-4576-AB91-EE6445C1F3E0}*/ oExContextMenu:create(,, {10,60},{610,370} ) oExContextMenu:FlatImageWidth := 0 oItems := oExContextMenu:Items() oItems1 := oItems:Add("Popup",2):Items() oItems1:Add("Item 1") oItems1:Add("Item 2") oItems1:Add("Item 3") oExContextMenu:Select() oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |
123 |
How do I hide the left gray portion to be shown on the drop down menu/popup (method 1)
#include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oExContextMenu LOCAL oItems,oItems1 oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oExContextMenu := XbpActiveXControl():new( oForm:drawingArea ) oExContextMenu:CLSID := "Exontrol.ContextMenu.1" /*{2DFBF6CB-9198-4576-AB91-EE6445C1F3E0}*/ oExContextMenu:create(,, {10,60},{610,370} ) oExContextMenu:MenuAppearance := 0/*exMenuNormal*/ oItems := oExContextMenu:Items() oItems1 := oItems:Add("Popup",2):Items() oItems1:Add("Item 1") oItems1:Add("Item 2") oItems1:Add("Item 3") oExContextMenu:Select() oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |
122 |
How can I arrange the drop down item from left to right, rather than top to bottom
PROCEDURE OnSelectItem(oExContextMenu,Itm) DevOut( "Clicked" ) RETURN #include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oExContextMenu LOCAL oitem,oitem1 LOCAL oItems,oItems1,oItems2 oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oExContextMenu := XbpActiveXControl():new( oForm:drawingArea ) oExContextMenu:CLSID := "Exontrol.ContextMenu.1" /*{2DFBF6CB-9198-4576-AB91-EE6445C1F3E0}*/ oExContextMenu:create(,, {10,60},{610,370} ) oExContextMenu:SelectItem := {|Itm| OnSelectItem(oExContextMenu,Itm)} /*Occurs when the user selects the item.*/ oExContextMenu:MenuAppearance := 0/*exMenuNormal*/ oItems := oExContextMenu:Items() oitem := oItems:Add("Button",2) oitem:ShowAsButton := 275/*exShowAsSelectButtonBottom+exShowAsButtonAutoSize*/ oItems1 := oitem:Items() oitem1 := oItems1:Add("",2) oitem1:GroupPopup := 3/*exNoGroupPopupFrame+exGroupPopup*/ oItems2 := oitem1:Items() oItems2:Add("Item 1") oItems2:Add("Item 2") oItems2:Add("Item 3") oItems:Add(""):ToString := "Button[button=0x0113][popupapp=6]([group=0x03](Item 1,Item 2,Item 3))" oExContextMenu:Select() oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |
121 |
How can I add a drop down button / combobox (method 2)
PROCEDURE OnSelectItem(oExContextMenu,Itm) DevOut( "Clicked" ) RETURN #include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oExContextMenu LOCAL oitem LOCAL oItems,oItems1 oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oExContextMenu := XbpActiveXControl():new( oForm:drawingArea ) oExContextMenu:CLSID := "Exontrol.ContextMenu.1" /*{2DFBF6CB-9198-4576-AB91-EE6445C1F3E0}*/ oExContextMenu:create(,, {10,60},{610,370} ) oExContextMenu:SelectItem := {|Itm| OnSelectItem(oExContextMenu,Itm)} /*Occurs when the user selects the item.*/ oItems := oExContextMenu:Items() oitem := oItems:Add("Button",2) oitem:ShowAsButton := 275/*exShowAsSelectButtonBottom+exShowAsButtonAutoSize*/ oItems1 := oitem:Items() oItems1:Add("Item 1") oItems1:Add("Item 2") oItems1:Add("Item 3") oItems:Add(""):ToString := "Button[button=275][popupapp=6](Item 1[id=20],Item 2[id=30],Item 3[id=40])" oExContextMenu:Select() oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |
120 |
How can I add a drop down button / combobox (method 1)
PROCEDURE OnSelectItem(oExContextMenu,Itm) DevOut( "Clicked" ) RETURN #include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oExContextMenu LOCAL oitem LOCAL oItems,oItems1 oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oExContextMenu := XbpActiveXControl():new( oForm:drawingArea ) oExContextMenu:CLSID := "Exontrol.ContextMenu.1" /*{2DFBF6CB-9198-4576-AB91-EE6445C1F3E0}*/ oExContextMenu:create(,, {10,60},{610,370} ) oExContextMenu:SelectItem := {|Itm| OnSelectItem(oExContextMenu,Itm)} /*Occurs when the user selects the item.*/ oItems := oExContextMenu:Items() oitem := oItems:Add("Button",2) oitem:ShowAsButton := 19/*exShowAsSelectButton+exShowAsButtonAutoSize*/ oItems1 := oitem:Items() oItems1:Add("Item 1") oItems1:Add("Item 2") oItems1:Add("Item 3") oItems:Add(""):ToString := "Button[button=0x13][popupapp=6](Item 1[id=20],Item 2[id=30],Item 3[id=40])" oExContextMenu:Select() oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |
119 |
I am using exShowAsSelectButton/exShowAsSelectButtonBottom but none of them works. What could be wrong
PROCEDURE OnSelectItem(oExContextMenu,Itm) DevOut( "Clicked" ) RETURN #include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oExContextMenu LOCAL oitem LOCAL oItems,oItems1 oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oExContextMenu := XbpActiveXControl():new( oForm:drawingArea ) oExContextMenu:CLSID := "Exontrol.ContextMenu.1" /*{2DFBF6CB-9198-4576-AB91-EE6445C1F3E0}*/ oExContextMenu:create(,, {10,60},{610,370} ) oExContextMenu:SelectItem := {|Itm| OnSelectItem(oExContextMenu,Itm)} /*Occurs when the user selects the item.*/ oItems := oExContextMenu:Items() oitem := oItems:Add("Button",2) oitem:ShowAsButton := 19/*exShowAsSelectButton+exShowAsButtonAutoSize*/ oItems1 := oitem:Items() oItems1:Add("Item 1") oItems1:Add("Item 2") oItems1:Add("Item 3") oExContextMenu:Select() oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |
118 |
How can I add a button (push button)
PROCEDURE OnSelectItem(oExContextMenu,Itm) DevOut( "Clicked" ) RETURN #include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oExContextMenu LOCAL oItems oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oExContextMenu := XbpActiveXControl():new( oForm:drawingArea ) oExContextMenu:CLSID := "Exontrol.ContextMenu.1" /*{2DFBF6CB-9198-4576-AB91-EE6445C1F3E0}*/ oExContextMenu:create(,, {10,60},{610,370} ) oExContextMenu:SelectItem := {|Itm| OnSelectItem(oExContextMenu,Itm)} /*Occurs when the user selects the item.*/ oItems := oExContextMenu:Items() oItems:Add("Button"):ShowAsButton := 3/*exShowAsButtonAutoSize+exShowAsButton*/ oItems:Add(""):ToString := "Button[button=0x03]" oExContextMenu:Select() oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |
117 |
How can I display grouping items with no frame arround
|
116 |
How can I display grouping items of the same size/width/height
|
115 |
Is it possible to display a ticker frame arround grouping items
|
114 |
How do I display items horizontally arranged
|
113 |
Is it possible to expand an item when it is clicked (tree,group,vertical)
#include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oExContextMenu LOCAL oitem,oitem1 LOCAL oItems,oItems1 oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oExContextMenu := XbpActiveXControl():new( oForm:drawingArea ) oExContextMenu:CLSID := "Exontrol.ContextMenu.1" /*{2DFBF6CB-9198-4576-AB91-EE6445C1F3E0}*/ oExContextMenu:create(,, {10,60},{610,370} ) oItems := oExContextMenu:Items() oitem := oItems:Add("Expand",2) oitem:GroupPopup := 259/*exGroupPopupVertical+exNoGroupPopupFrame+exGroupPopup*/ oitem:Check := .T. oitem:ShowPopupOnChecked := .T. oItems1 := oitem:Items() oItems1:Padding := "22,0,0,0" oItems1:Add("Radio 1"):Radio := .T. oItems1:Add("Radio 2"):Radio := .T. oitem1 := oItems1:Add("Radio 3") oitem1:Radio := .T. oitem1:Checked := .T. oitem:Checked := .T. oItems:Add(""):ToString := "Expand[typ=1][chk=1][spchk=-1][group=0x0103][itemspad=22,0,0,0](Radio 1[id=20][typ=2],Radio 2[id=30][typ=2],Radio 3[id=40][typ=2][chk=1])" oExContextMenu:Select() oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |
112 |
Is it possible to expand an item when it is clicked (tree,group,vertical)
#include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oExContextMenu LOCAL oitem,oitem1 LOCAL oItems,oItems1 oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oExContextMenu := XbpActiveXControl():new( oForm:drawingArea ) oExContextMenu:CLSID := "Exontrol.ContextMenu.1" /*{2DFBF6CB-9198-4576-AB91-EE6445C1F3E0}*/ oExContextMenu:create(,, {10,60},{610,370} ) oItems := oExContextMenu:Items() oitem := oItems:Add("Expand",2) oitem:GroupPopup := 259/*exGroupPopupVertical+exNoGroupPopupFrame+exGroupPopup*/ oitem:Check := .T. oitem:ShowPopupOnChecked := .T. oItems1 := oitem:Items() oItems1:Padding := "22,0,0,0" oItems1:Add("Radio 1"):Radio := .T. oItems1:Add("Radio 2"):Radio := .T. oitem1 := oItems1:Add("Radio 3") oitem1:Radio := .T. oitem1:Checked := .T. oitem:Checked := .T. oExContextMenu:Select() oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |
111 |
Is it possible to expand an item when it is clicked (group)
#include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oExContextMenu LOCAL oitem LOCAL oItems,oItems1 oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oExContextMenu := XbpActiveXControl():new( oForm:drawingArea ) oExContextMenu:CLSID := "Exontrol.ContextMenu.1" /*{2DFBF6CB-9198-4576-AB91-EE6445C1F3E0}*/ oExContextMenu:create(,, {10,60},{610,370} ) oItems := oExContextMenu:Items() oitem := oItems:Add("Expand",2) oitem:GroupPopup := 1/*exGroupPopup*/ oitem:ItemHeight := 24 oitem:Check := .T. oitem:ShowPopupOnChecked := .T. oItems1 := oitem:Items() oItems1:Add("Item 1") oItems1:Add("Item 2") oItems1:Add("Item 3") oExContextMenu:Select() oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |
110 |
Is it possible to extend an item when it is clicked
#include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oExContextMenu LOCAL oitem LOCAL oItems,oItems1 oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oExContextMenu := XbpActiveXControl():new( oForm:drawingArea ) oExContextMenu:CLSID := "Exontrol.ContextMenu.1" /*{2DFBF6CB-9198-4576-AB91-EE6445C1F3E0}*/ oExContextMenu:create(,, {10,60},{610,370} ) oItems := oExContextMenu:Items() oitem := oItems:Add("Expand",2) oitem:Check := .T. oitem:ShowPopupOnChecked := .T. oItems1 := oitem:Items() oItems1:Add("Item 1") oItems1:Add("Item 2") oItems1:Add("Item 3") oExContextMenu:Select() oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |
109 |
Does your control implement padding for item
|
108 |
How can I add an empty item for a horizontal group
#include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oExContextMenu LOCAL oitem,oitem1,oitem2 LOCAL oItems,oItems1 oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oExContextMenu := XbpActiveXControl():new( oForm:drawingArea ) oExContextMenu:CLSID := "Exontrol.ContextMenu.1" /*{2DFBF6CB-9198-4576-AB91-EE6445C1F3E0}*/ oExContextMenu:create(,, {10,60},{610,370} ) oItems := oExContextMenu:Items() oitem := oItems:Add("",2) oitem:GroupPopup := 3/*exNoGroupPopupFrame+exGroupPopup*/ oItems1 := oitem:Items() oItems1:Add("Item 1") oitem1 := oItems1:Add("",2) oitem1:GroupPopup := 5/*exGroupPopupCenter+exGroupPopup*/ oitem1:ItemHeight := 12 oitem2 := oitem1:Items():Add("") oitem2:Enabled := .F. oitem2:ItemHeight := 8 oitem2:CaptionWidth := 8 oItems1:Add("Item 2") oExContextMenu:Select() oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |
107 |
How can I add an empty/separator item
#include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oExContextMenu LOCAL oitem LOCAL oItems oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oExContextMenu := XbpActiveXControl():new( oForm:drawingArea ) oExContextMenu:CLSID := "Exontrol.ContextMenu.1" /*{2DFBF6CB-9198-4576-AB91-EE6445C1F3E0}*/ oExContextMenu:create(,, {10,60},{610,370} ) oItems := oExContextMenu:Items() oItems:Add("Item") oitem := oItems:Add("") oitem:Enabled := .F. oitem:ItemHeight := 2 oitem:CaptionWidth := 8 oitem:SetProperty("BackColor",AutomationTranslateColor( GraMakeRGBColor ( { 240,240,240 } ) , .F. )) oItems:Add("Item") oExContextMenu:Select() oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |
106 |
How can I add an empty/frame item
#include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oExContextMenu LOCAL oitem,oitem1 LOCAL oItems oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oExContextMenu := XbpActiveXControl():new( oForm:drawingArea ) oExContextMenu:CLSID := "Exontrol.ContextMenu.1" /*{2DFBF6CB-9198-4576-AB91-EE6445C1F3E0}*/ oExContextMenu:create(,, {10,60},{610,370} ) oItems := oExContextMenu:Items() oItems:Add("Item 1") oitem := oItems:Add("",2) oitem:GroupPopup := 5/*exGroupPopupCenter+exGroupPopup*/ oitem:ItemHeight := 12 oitem1 := oitem:Items():Add("") oitem1:Enabled := .F. oitem1:ItemHeight := 8 oitem1:CaptionWidth := 8 oItems:Add("Item 2") oExContextMenu:Select() oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |
105 |
How can I specify the height of the item
|
104 |
How can I specify the width of the item
|
103 |
How do I align the item
#include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oExContextMenu LOCAL oitem,oitem1 LOCAL oItems oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oExContextMenu := XbpActiveXControl():new( oForm:drawingArea ) oExContextMenu:CLSID := "Exontrol.ContextMenu.1" /*{2DFBF6CB-9198-4576-AB91-EE6445C1F3E0}*/ oExContextMenu:create(,, {10,60},{610,370} ) oItems := oExContextMenu:Items() oItems:SetProperty("BackColor",AutomationTranslateColor( GraMakeRGBColor ( { 250,250,250 } ) , .F. )) oItems:Add("Item") oitem := oItems:Add("Item") oitem:Alignment := 1/*exCenter*/ oitem:CaptionWidth := 128 oitem1 := oItems:Add("Item") oitem1:Alignment := 2/*exRight*/ oitem1:CaptionWidth := 128 oItems:Add(""):ToString := "Item[align=1]" oExContextMenu:Select() oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |
102 |
How can I underline the item
|
101 |
How can I show the item as strikeout
|