19
|
How can I replace or add an icon at runtime

OBJECT toolbarcrd;
toolbarcrd = ObjectByName("AN1") ;
_ObjectCallMethod( toolbarcrd , "ReplaceIcon", "gAAAABgYACEHgUJFEEAAWhUJCEJEEJggEhMCYEXjUbjkJQECj8gj8hAEjkshYEpk8kf8ClsulsvAExmcvf83js5nU7nkCeEcn8boMaocXosCB9Hn09pkzcEuoL/fE+O" +
"kYB0gB9YhIHrddgVcr9aktZADAD8+P8CgIA==");
_ObjectCallMethod( toolbarcrd , "ReplaceIcon", "C:\images\favicon.ico",0);
_ObjectSetProperty( toolbarcrd , "Format", "1,2,3");
_ObjectCallMethod(toolbarcrd, "ExecuteTemplate", "Item(1).Caption = `<img>1</img>`");
_ObjectCallMethod(toolbarcrd, "ExecuteTemplate", "Item(2).Caption = `<img>2</img>`");
_ObjectCallMethod(toolbarcrd, "ExecuteTemplate", "Item(3).Caption = `<img>3</img>Icon`");
|
18
|
Display a custom tooltip
// MouseMove event - Occurs when the user moves the mouse.
FUNCTION toolbarcrdEvents_MouseMove(OBJECT toolbarcrd, INT Button, INT Shift, INT X, INT Y)
_ObjectCallMethod( toolbarcrd , "ShowToolTip", "new content","","","+8","+8");
END
|
17
|
Shows the tooltip of the object moved relative to its default position
// MouseMove event - Occurs when the user moves the mouse.
FUNCTION toolbarcrdEvents_MouseMove(OBJECT toolbarcrd, INT Button, INT Shift, INT X, INT Y)
_ObjectCallMethod( toolbarcrd , "ShowToolTip", "<null>","<null>","","+8","+8");
END
OBJECT item,toolbarcrd;
toolbarcrd = ObjectByName("AN1") ;
ObjectAssociateEvents("toolbarcrdEvents", toolbarcrd);
_ObjectSetProperty( toolbarcrd , "Format", "(1/2),3");
item = _ObjectCallMethod(toolbarcrd, "ExecuteTemplate", "Item(1)");
_ObjectSetProperty( item , "Caption", "Item <b>1");
_ObjectSetProperty( item , "ToolTip", "This is a bit of text that's shown when cursor hovers the item");
_ObjectCallMethod(toolbarcrd, "ExecuteTemplate", "Item(2).Caption = `Item <b>2`");
_ObjectCallMethod(toolbarcrd, "ExecuteTemplate", "Item(3).Caption = `Item <b>3`");
|
16
|
ImageSize property on 32 (specifies the size of the control' icons)

OBJECT toolbarcrd;
toolbarcrd = ObjectByName("AN1") ;
_ObjectCallMethod( toolbarcrd , "BeginUpdate");
_ObjectSetProperty( toolbarcrd , "ImageSize", 32);
_ObjectSetProperty( _ObjectGetProperty( toolbarcrd , "Font") , "Size", 16);
_ObjectCallMethod( toolbarcrd , "Images", "gBJJgBAIDAAEg4AEEKAD/hz/EMNh8TIRNGwAjEZAEXjAojKAjMLjABhkaABAk0plUrlktl0vmExmUzmk1m03nE5nU7nk9miAoE+oVDolFo1HpFJpU5h8Sf9OqFNqUOq" +
"NUqdPq9VrFWrlbr1QpdhAFAkFis1ntFptVrtkrpszrNvmVxqk3uVtm1kmF3sdBvF/wGBmV+j9BYGHwWJulfxdax2NyFdx2JlV6l9Nw7AAGZymdz2Cy2GxErvWcz9ivlw" +
"yV21cuxugwktzGIzmvwtl0+53U5y0a0Wazmmyu/3dCyOMyXHx/J5nIr9q3uyqnBxFN3G46ma4vb7mD2Ng4nZze00fDkHC7t7us2rOX5tguetpHRlmz4HVqnXk1PjHO+C" +
"MPo9MBMC+j2vC8j7wS8cFNI4kBo05UIvfCT/NsnsApU+0Fqg/T+oy/kPxC0sEQfErKQK96+w28UWRI8UGvO8sTLS9r2PWmsMJTDTask3CsIbIEQRA3shOXEEAO/GclJ9" +
"FEKrrA8FRbKMXRIlb0JxCkjS1LMswhCcvuel0cv26cSMa8Ufx+2sQwhEUoSXOCjSbLcnxjKc7sdKUVyq28NtVI71P9P7JxtQEapjQ6fzfM8zPfNE2PhIsLL63E40slk5" +
"y7N89LcyU9SvMb3SdUc6VJLj5VLVLfO/PS9KzNFHUa/0XyBD0dxlS9cxhMlTRSoNXypPErWDPyfNS+MwprRNO0FD8wVVZ1AI08URwVRjtJ1WCn21QkkUrXVLVPQS/XIk" +
"FgTxT9iONZ9xVTdq+L1eKg3kkF6Upe68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A1LHgQ90Y/KpoQHAD+pB/R4NzIaMAB9Xaw1gqaAOsh/A/ptIkWUfhGK1kZH8R" +
"gH5GqvgArqRmt4AAPrTroRofBGADkqr6Rmu4D7CEaHARiwpJrEEZsXXwlVjyMWRsaRqwdkLGNBABZmytmyMnaINZqyVpLR2ftKAAAdd6h2osbaskdiq4EZtgSmyNcbVW" +
"RJNXe3AA7REar3b0stlAAXBtoRmvJGLjEYAHUWsFcwCD/rnaop9aEICMAPdK5hT6xpeuzdOtAgKuJeGfdq6ggEbkTvAP+p9UCHXrvKkcgIA==");
_ObjectSetProperty( toolbarcrd , "BackColor", 16777215);
_ObjectSetProperty( toolbarcrd , "Format", "1,2,3");
_ObjectCallMethod(toolbarcrd, "ExecuteTemplate", "Item(1).Caption = `<img>1</img>`");
_ObjectCallMethod(toolbarcrd, "ExecuteTemplate", "Item(2).Caption = `<img>2</img>`");
_ObjectCallMethod(toolbarcrd, "ExecuteTemplate", "Item(3).Caption = `<img>3</img>Icon`");
_ObjectCallMethod( toolbarcrd , "EndUpdate");
|
15
|
ImageSize property on 16 (default) (specifies the size of the control' icons)

OBJECT toolbarcrd;
toolbarcrd = ObjectByName("AN1") ;
_ObjectCallMethod( toolbarcrd , "BeginUpdate");
_ObjectSetProperty( toolbarcrd , "ImageSize", 16);
_ObjectCallMethod( toolbarcrd , "Images", "gBJJgBAIDAAEg4ACEKAD/hz/EMNh8TIRNGwAjEZAEXjAojJAjMLjABAAgjUYkUnlUrlktl0vmExmUzmk1m03nE5nU7nkrQCAntBoVDolFo1HoM/ADAplLptImdMYFOq" +
"dSqlXq1QrVbrlGpVWsFNrNdnNjsk7pQAtNroFnt0sh8Yr9iulTuNxs1Eu8OiT/vsnsNVutXlk/oGGtVKxGLxWNtsZtN8iUYuNvy0Zvd+xNYwdwvl4p870GCqc8vOeuVt" +
"tmp1knyOayWVy+WzN/ze1wOElenm+12WUz/Bv2/3UyyWrzeutux2GSyGP2dQ33C1ur3GD3M4zUNzHdlWjq/E3nGzVpjWv4HA7fRy/Tv2IrN8rPW6nZ3ve7mUlfu20Z8a" +
"cvQyb+vY9jasYoDwMm+LytVBDqKG3z8O3Cb8P+mkAuY9cCQ2uL4KaxDKvkp8RNLEjqugnrwQo/UWPzFyeQw5sNLZFENrI4kOqU66pw8uzmOKvTqNqjULJvGL1JO48GtT" +
"GsbLdEL3scxLlyiw8dQeoUVxdLTtyKmUjwGlslRPJsnK1HbAKbKCrsQo8uQk/CeP44iaR/ATnTNPLvyxPU+z9P9AUDQVBowiofJXQ6Oo+kKMpIkjztE4TKn4P6JowfgP" +
"nwD5/nAjB8AOeAPo0eAA1IAFH07UhAIMpYAVIYFHqBUhwVjV1S1EtQAHxW65V0AZwAeuQAnwB5gAPYViEDVhwAHTQBkCjB4gOhwDmCyhH0sACAg==");
_ObjectSetProperty( toolbarcrd , "BackColor", 16777215);
_ObjectSetProperty( toolbarcrd , "Format", "1,2,3");
_ObjectCallMethod(toolbarcrd, "ExecuteTemplate", "Item(1).Caption = `<img>1</img>`");
_ObjectCallMethod(toolbarcrd, "ExecuteTemplate", "Item(2).Caption = `<img>2</img>`");
_ObjectCallMethod(toolbarcrd, "ExecuteTemplate", "Item(3).Caption = `<img>3</img>Icon`");
_ObjectCallMethod( toolbarcrd , "EndUpdate");
|
14
|
How can I defines a custom border for the control

OBJECT toolbarcrd;
toolbarcrd = ObjectByName("AN1") ;
_ObjectCallMethod( toolbarcrd , "BeginUpdate");
_ObjectCallMethod( _ObjectGetProperty( toolbarcrd , "VisualAppearance") , "Add", 1,"gBFLBCJwBAEHhEJAAEhABUUIQAAYAQGKIcBiAKBQAGaAoDgYN4MAANAxDTBMKgBBCLIxhEYobgmGIaRiBMIxAKIZhzEgYRoiAYhXDiHwyARHUIvfCsPxBDqBY4gOZpX" +
"hmJImShKUZybJ8RR3GaaZ5iWagAoyPJKSLCMiyPSUUw+GKVYjjej6HpCTY4RbXU7VFQFKhpK6sRxAKYoapyGpMU5YUTSfJ4DSkGAYBJFUZLWgSeJ6DRSMBvfggATXMS4" +
"LYuKbXLhCCYBgIA==");
_ObjectSetProperty( toolbarcrd , "Appearance", 16777216);
_ObjectSetProperty( toolbarcrd , "Format", "1,2,|,3:64");
_ObjectCallMethod(toolbarcrd, "ExecuteTemplate", "Item(3).Caption = `< <b>right</b> >`");
_ObjectSetProperty( toolbarcrd , "BackColor", 16777215);
_ObjectCallMethod( toolbarcrd , "EndUpdate");
|
13
|
Can I display items one below to other

OBJECT toolbarcrd;
toolbarcrd = ObjectByName("AN1") ;
_ObjectSetProperty( toolbarcrd , "Format", "(1/2):64,(3/4):64");
_ObjectCallMethod(toolbarcrd, "ExecuteTemplate", "Item(1).Caption = `Item <off 4><b>A`");
_ObjectCallMethod(toolbarcrd, "ExecuteTemplate", "Item(2).Caption = `Item <off 4><b>B`");
_ObjectCallMethod(toolbarcrd, "ExecuteTemplate", "Item(3).Caption = `Item <off 4><b>C`");
_ObjectCallMethod(toolbarcrd, "ExecuteTemplate", "Item(4).Caption = `Item <off 4><b>D`");
|
12
|
How can I add a separator item

OBJECT toolbarcrd;
toolbarcrd = ObjectByName("AN1") ;
_ObjectSetProperty( toolbarcrd , "Format", "1,2,-1,3,4");
|
11
|
Is it possible to disable an item

OBJECT item,toolbarcrd;
toolbarcrd = ObjectByName("AN1") ;
_ObjectCallMethod( toolbarcrd , "Images", "gBJJgBAIDAAGAAEAAQhYAf8Pf4hh0QihCJo2AEZjQAjEZFEaIEaEEaAIAkcbk0olUrlktl0vmExmUzmk1m03nE5nU7nk9n0/oFBoVDolFo1HpFJpVLplNp1PqFRqVTq" +
"lVq1XrFZrVbrldr1fsFhsVjslls1ntFptVrtltt1vuFxuVzul1u13vF5vV7vl9v1/wGBwWDwmFw2HxGJxWLxmNx0xiFdyOTh8Tf9ZymXx+QytcyNgz8r0OblWjyWds+m" +
"0ka1Vf1ta1+r1mos2xrG2xeZ0+a0W0qOx3GO4NV3WeyvD2XJ5XL5nN51aiw+lfSj0gkUkAEllHanHI5j/cHg8EZf7w8vl8j4f/qfEZeB09/vjLAB30+kZQAP/P5/H6/y" +
"NAOAEAwCjMBwFAEDwJBMDwLBYAP2/8Hv8/gAGAD8LQs9w/nhDY/oygIA=");
_ObjectSetProperty( toolbarcrd , "BackColor", 16777215);
_ObjectSetProperty( toolbarcrd , "Format", "1,2,3");
_ObjectCallMethod(toolbarcrd, "ExecuteTemplate", "Item(1).Caption = `<img>1</img>`");
_ObjectCallMethod(toolbarcrd, "ExecuteTemplate", "Item(2).Caption = `<img>2</img>`");
item = _ObjectCallMethod(toolbarcrd, "ExecuteTemplate", "Item(3)");
_ObjectSetProperty( item , "Caption", "<img>3</img>Disabled");
_ObjectSetProperty( item , "Enabled", 0);
|
10
|
Is it possible to change the item's caption/image when user hovers the cursor

// MouseIn event - Occurs when the mouse enters the part.
FUNCTION toolbarcrdEvents_MouseIn(OBJECT toolbarcrd, VARIANT ID)
_ObjectCallMethod(toolbarcrd, "TemplatePut", "Dim ID")
_ObjectCallMethod(toolbarcrd, "TemplatePut", ID)
_ObjectCallMethod(toolbarcrd, "ExecuteTemplate", "Item(ID).Caption = `hover`");
END
// MouseOut event - Occurs when the mouse exists the part.
FUNCTION toolbarcrdEvents_MouseOut(OBJECT toolbarcrd, VARIANT ID)
_ObjectCallMethod(toolbarcrd, "ExecuteTemplate", "Item(ID).Caption = ID");
END
OBJECT toolbarcrd;
toolbarcrd = ObjectByName("AN1") ;
ObjectAssociateEvents("toolbarcrdEvents", toolbarcrd);
_ObjectSetProperty( toolbarcrd , "Format", "1,2,3,4");
|
9
|
Does your control support tooltip for items

OBJECT item,toolbarcrd;
toolbarcrd = ObjectByName("AN1") ;
_ObjectSetProperty( toolbarcrd , "Format", "(1/2),3");
item = _ObjectCallMethod(toolbarcrd, "ExecuteTemplate", "Item(1)");
_ObjectSetProperty( item , "Caption", "Item <b>1");
_ObjectSetProperty( item , "ToolTip", "This is a bit of text that's shown when cursor hovers the item");
_ObjectCallMethod(toolbarcrd, "ExecuteTemplate", "Item(2).Caption = `Item <b>2`");
_ObjectCallMethod(toolbarcrd, "ExecuteTemplate", "Item(3).Caption = `Item <b>3`");
|
8
|
Is it possible to add an anchor element, similar to a link into a webpage

// AnchorClick event - Occurs when an anchor element is clicked.
FUNCTION toolbarcrdEvents_AnchorClick(OBJECT toolbarcrd, STRING AnchorID, STRING Options)
Message( AnchorID );
END
OBJECT toolbarcrd;
toolbarcrd = ObjectByName("AN1") ;
ObjectAssociateEvents("toolbarcrdEvents", toolbarcrd);
_ObjectSetProperty( toolbarcrd , "BackColor", 16777215);
_ObjectSetProperty( toolbarcrd , "Format", "^"<a a1>link</a>^":32,1,2,3");
|
7
|
How can I change the background of the hovering item

OBJECT toolbarcrd;
toolbarcrd = ObjectByName("AN1") ;
_ObjectCallMethod( _ObjectGetProperty( toolbarcrd , "VisualAppearance") , "Add", 1,"c:\exontrol\images\normal.ebn");
_ObjectCallMethod(toolbarcrd, "ExecuteTemplate", "Background(155) = 16777216");
_ObjectSetProperty( toolbarcrd , "Format", "1,2,3,4");
|
6
|
Can I display an item aligned to the right

OBJECT toolbarcrd;
toolbarcrd = ObjectByName("AN1") ;
_ObjectSetProperty( toolbarcrd , "Format", "1,2,|,3:64");
_ObjectCallMethod(toolbarcrd, "ExecuteTemplate", "Item(3).Caption = `< <b>right</b> >`");
|
5
|
Can I display pictures in the toolbar

OBJECT toolbarcrd;
toolbarcrd = ObjectByName("AN1") ;
_ObjectCallMethod(toolbarcrd, "ExecuteTemplate", "HTMLPicture(`pic1`) = `c:\exontrol\images\card.png`");
_ObjectCallMethod(toolbarcrd, "ExecuteTemplate", "HTMLPicture(`pic2`) = `c:\exontrol\images\diary.png`");
_ObjectSetProperty( toolbarcrd , "Format", "1,2,3");
_ObjectCallMethod(toolbarcrd, "ExecuteTemplate", "Item(1).Caption = `<img>pic1:48</img>`");
_ObjectCallMethod(toolbarcrd, "ExecuteTemplate", "Item(2).Caption = `<img>pic2:30</img>`");
_ObjectCallMethod(toolbarcrd, "ExecuteTemplate", "Item(3).Caption = `<img>pic1:24</img> Picture`");
|
4
|
Can I display icons in the toolbar

OBJECT toolbarcrd;
toolbarcrd = ObjectByName("AN1") ;
_ObjectCallMethod( toolbarcrd , "Images", "gBJJgBAIDAAGAAEAAQhYAf8Pf4hh0QihCJo2AEZjQAjEZFEaIEaEEaAIAkcbk0olUrlktl0vmExmUzmk1m03nE5nU7nk9n0/oFBoVDolFo1HpFJpVLplNp1PqFRqVTq" +
"lVq1XrFZrVbrldr1fsFhsVjslls1ntFptVrtltt1vuFxuVzul1u13vF5vV7vl9v1/wGBwWDwmFw2HxGJxWLxmNx0xiFdyOTh8Tf9ZymXx+QytcyNgz8r0OblWjyWds+m" +
"0ka1Vf1ta1+r1mos2xrG2xeZ0+a0W0qOx3GO4NV3WeyvD2XJ5XL5nN51aiw+lfSj0gkUkAEllHanHI5j/cHg8EZf7w8vl8j4f/qfEZeB09/vjLAB30+kZQAP/P5/H6/y" +
"NAOAEAwCjMBwFAEDwJBMDwLBYAP2/8Hv8/gAGAD8LQs9w/nhDY/oygIA=");
_ObjectSetProperty( toolbarcrd , "BackColor", 16777215);
_ObjectSetProperty( toolbarcrd , "Format", "1,2,3");
_ObjectCallMethod(toolbarcrd, "ExecuteTemplate", "Item(1).Caption = `<img>1</img>`");
_ObjectCallMethod(toolbarcrd, "ExecuteTemplate", "Item(2).Caption = `<img>2</img>`");
_ObjectCallMethod(toolbarcrd, "ExecuteTemplate", "Item(3).Caption = `<img>3</img>Icon`");
|
3
|
How can I get ride of the top-bottom lines

OBJECT toolbarcrd;
toolbarcrd = ObjectByName("AN1") ;
_ObjectSetProperty( toolbarcrd , "Appearance", 4);
_ObjectSetProperty( toolbarcrd , "BackColor", 16777215);
_ObjectSetProperty( toolbarcrd , "Format", "1,-1,2");
_ObjectCallMethod(toolbarcrd, "ExecuteTemplate", "Item(1).Caption = `Exit`");
_ObjectCallMethod(toolbarcrd, "ExecuteTemplate", "Item(2).Caption = `Item <b>A\r\nItem <b>A#1\r\nItem <b>B#2\r\nItem <b>C#3`");
|
2
|
How can I display a drop-down panel

// Select event - Notifies once the user clicks the item.
FUNCTION toolbarcrdEvents_Select(OBJECT toolbarcrd, VARIANT ID, VARIANT SelectedID)
Message( "Select" );
Message( SelectedID );
END
OBJECT toolbarcrd;
toolbarcrd = ObjectByName("AN1") ;
ObjectAssociateEvents("toolbarcrdEvents", toolbarcrd);
_ObjectSetProperty( toolbarcrd , "ItemsDelimiter", ";");
_ObjectSetProperty( toolbarcrd , "Format", "1,-1,2");
_ObjectCallMethod(toolbarcrd, "ExecuteTemplate", "Item(1).Caption = `Exit`");
_ObjectCallMethod(toolbarcrd, "ExecuteTemplate", "Item(2).Caption = `Item <b>A;Item <b>A#1;Item <b>B#2;Item <b>C#3`");
|
1
|
How can I add / display items with the toolbar

// Select event - Notifies once the user clicks the item.
FUNCTION toolbarcrdEvents_Select(OBJECT toolbarcrd, VARIANT ID, VARIANT SelectedID)
_ObjectCallMethod(toolbarcrd, "TemplatePut", "Dim ID")
_ObjectCallMethod(toolbarcrd, "TemplatePut", ID)
Message( "Select" );
Message( _ObjectCallMethod(toolbarcrd, "ExecuteTemplate", "Item(ID).Caption") );
END
OBJECT toolbarcrd;
toolbarcrd = ObjectByName("AN1") ;
ObjectAssociateEvents("toolbarcrdEvents", toolbarcrd);
_ObjectSetProperty( toolbarcrd , "Format", "1,-1,2,3");
_ObjectCallMethod(toolbarcrd, "ExecuteTemplate", "Item(1).Caption = `Exit`");
_ObjectCallMethod(toolbarcrd, "ExecuteTemplate", "Item(2).Caption = `Item <b>A`");
_ObjectCallMethod(toolbarcrd, "ExecuteTemplate", "Item(3).Caption = `Item <b>B`");
|