XWidgetSoft Forum https://xwidget.com/bbs/ |
|
Changing Icon,path and title in ShortcutListCore from code https://xwidget.com/bbs/viewtopic.php?f=8&t=3664 |
Page 1 of 1 |
Author: | digigamer [ October 19th, 2013, 1:03 am ] |
Post subject: | Changing Icon,path and title in ShortcutListCore from code |
Is it possible to change the icon title and path of a shortcut in ShortcutListCore from code. ? If such thing exists, it would be a great relief for me. I don't want to "reinvent the wheel" everytime. **Note: here changing means, changing the icon title and path without any user interaction. I don't want to popup an dialog box to choose the icon. |
Author: | Jimking [ October 19th, 2013, 1:30 am ] |
Post subject: | Re: Changing Icon,path and title in ShortcutListCore from c |
You mean something else than the "Accept File DragDop" option that exist in "Attributes" ->"Others" submenu? Using this option when drag a file on the shortcut, this will take automatically the name, icon and the path of the file... Now for make further modifications (specific icon and name) I'm afraid that you have to use settings window.. |
Author: | digigamer [ October 19th, 2013, 5:38 am ] |
Post subject: | Re: Changing Icon,path and title in ShortcutListCore from c |
Unfortunately yes. Actually I got it! Overwrite the value core1.shortcut(x).icon /path in the ini. Code: Setvalue('core1.shortcut1.name',"My name"); I did a similar work in Sapphire panel ... but forgot ![]() |
Author: | meme [ October 19th, 2013, 12:34 pm ] |
Post subject: | Re: Changing Icon,path and title in ShortcutListCore from c |
This may be helpful digigamer, it is two sections of the code I use to drag shortcuts from one core or location to another. COPY var StartIcon = "!SetIcon=" + eval(MoveStartCore).icon; eval(MoveEndCore).cmd(null, StartIcon); // copy the icon from start to end var StartPath = "!SetPath=" + eval(MoveStartCore).path; eval(MoveEndCore).cmd(null, StartPath); // copy the path from start to end var StartDesc = eval(MoveStartCore).displayName; eval(MoveEndCore).displayName = StartDesc; // copy display name to end Setvalue(MoveEndCore + ".displayName",StartDesc); // set display name in ini to preserve capital letters PASTE eval(CoreToEdit).cmd(null, CopyIcon); // paste the icon eval(CoreToEdit).cmd(null, CopyPath); // paste the path eval(CoreToEdit).displayName = CopyDesc; // paste the display name Setvalue(CoreToEdit + ".displayName",CopyDesc); // paste the display name in ini to preserve capital letter eval(CoreToEdit).param = CopyPara; // paste parameters to end Setvalue(CoreToEdit + ".param",CopyPara); // set parameters in ini |
Author: | digigamer [ October 25th, 2013, 4:29 am ] |
Post subject: | Re: Changing Icon,path and title in ShortcutListCore from c |
Sorry meme, your code wasn't of much help to me... My requirements are for the ShortCutListCore. And don't worry i accomplished it with that hack i wrote about above. |
Author: | meme [ October 25th, 2013, 11:55 am ] |
Post subject: | Re: Changing Icon,path and title in ShortcutListCore from c |
Hi digigamer Of course you said ShortcutListCore not Shortcutcore, my mistake ![]() I tried using the ShortcutListCore for a launchpad type widget but could not work out how to control the position of shortcuts in the list so they appeared at certain locations, not sorted automatically without gaps between, I know you can move them but you can not space them as far as I can see. In the end I used may Shortcutcores in fixed positions, then code allows you to drag and drop the content of one Shortcutcore to another in a different locations, this allows you to arrange the shortcuts however you like and they stay in that position. |
Author: | digigamer [ October 28th, 2013, 8:25 am ] |
Post subject: | Re: Changing Icon,path and title in ShortcutListCore from c |
I got a working launchpad like widget out of shortcutlistcore... Infact most of my widgets are based on that! Checkout: http://www.deviantart.com/deviation/408628707/ This was the one... I was asking help for: http://www.deviantart.com/deviation/408186941/ A dock like species! http://www.deviantart.com/deviation/349505646/ |
Page 1 of 1 | All times are UTC - 8 hours |
Powered by phpBB® Forum Software © phpBB Group http://www.phpbb.com/ |