Creating Collapsible/Expandable ConfigsNOTE: To skip this tutorial and play with the final result, you can get the final configs from here.A lot of people have asked how to create configs that can expand and collapse when you click on part of it. In the past this had to be done using 3rd party tools such as Alderaic's Start & Stop script. However, more recent versions of Samurize have comprehensive commandline options that allow you to achieve the same thing with a lot less hassle. This tutorial will show you how to create a simple config that has a button that allows you to expand/collapse it using Meter Linkage. First off, I have created a simple little config that shows a bunch of useful stuff (uptime, memory usage, the date etc.). Hopefully if you are familiar with Samurize this shouldn't be rocket science. I saved it as Samurize\Configs\SampleExpandCollapse\Expanded.ini. Now let's say we want to make this config collapse down so that the box is a smaller and only the "System Information" text is visible. We have to create this config ourselves. To do this I just made a copy of the Expanded.ini file from before, resized it and saved it as Samurize\Configs\SampleExpandCollapse\Collapsed.ini. Ok, we've got our expanded and collapsed configs. Now, next we need to create a "button" that, when clicked, switches from the expanded config to the collapsed config and vice-versa.
You will end up with something like this. Now we do the same thing with the collapsed config. Add a "button" image (this time I used a downwards-pointing arrow) as before and the blank Text Meter with Meter Linkage enabled as before. However, this time the Link Meter To: field should contain: client.exe i=SampleExpandCollapse c=SampleExpandCollapse/Expanded.ini reloadAs this time we want to load the Expanded config when the button is pressed. Also note the i=SampleExpandCollapse is the same as before - we want the same Samurize client to load the expanded config as the one that loaded the collapsed config (bear with me, it will become clear very soon!) Now our configs are complete. Let's try them out! Remember the i=SampleExpandCollapse I kept mentioning before? This is where it comes into play. You need to launch the SampleExpandCollapse instance of the Samurize client by either:
Then right-click on the client's tray icon and select the SampleExpandCollapse/Expanded.ini config we created earlier. Now try clicking on the up arrow - the client should switch to the collapsed config. Then when you click on the down arrow in the collapsed config, the client should switch to the expanded config. Success! ![]() ![]() Of course this is a very simple example; you can do more advanced things than this using Samurize's command line options (check out the Samurize Help File, Appendix -> Command Line Options Section). NOTE: If the linking doesn't work, make sure the Meter Linkage commands are correct, and check the FAQs about cases where meter linkage may not work. | ||
[ Back to Samurize Tutorials | ] |






