Conditionally Formatted Labels - Add Conditionally Formatted Labels in SMath Studio worksheets - Messages






Hi all,
Here there is a plugin to add labels customizable by canvas inputs.
Plugin languages:


- requirements: SMath Studio 0.96.5146 Nigthly build or later, .Net Framework 2.0;
- installation: SMath Studio: Tools > Plugins... > Online Gallery;
- documentation: download and unzip the attached archive;
- languages: if you want to have a new UI language look into the documentation's Language folder
Control Regions: CheckBoxList | ComboBoxList | ConditionallyFormattedLabel | NumericUpDown | PathPicker | RadioButtonList | Slider
CFLabelRegion_docs.7z (83 KiB) downloaded 850 time(s).

By the way, we can suppress viewing the if statement (only the formated label) by right click and unchecking "Display input data"
Regards,
Radovan
but I can't resize the label despite the presence of grip
sergio
Win64
Portable Version Smath 0.96 (build 4909)
Wrotethanks Davide,
but I can't resize the label despite the presence of grip
sergio
Win64
Portable Version Smath 0.96 (build 4909)
The size is exclusively driven by the contents (string length). Might be a good idea to hide the grips.
Please find attached a brick for bar charts. Please note that I was forced to fill the right of the bar by visible symbols as spaces obviously are disregarded for computing the region size.
Example cfregion barchart.sm (4 KiB) downloaded 271 time(s).
Correct, this is by design - like for hyperlink regionsWroteThe size is exclusively driven by the contents (string length).

WroteMight be a good idea to hide the grips.
I know, but is not yet possible; Andrey know this issue, the behavior will change in future
WrotePlease note that I was forced to fill the right of the bar by visible symbols as spaces obviously are disregarded for computing the region size.
I can force the plugin to measure also the trailing spaces, if could be useful, just let me know it

best regards,
Davide
WroteI can force the plugin to measure also the trailing spaces, if could be useful, just let me know it
Done, updated
- works in Smath Viewer;
- default background color (empty string): white;
- default foreground color (empty string): black.
As you see, the region can display multiline text, thus it would be possible to do stuff like the bar chart in a single region, if there was access to the newline character from the GUI.
I'd propose to accept a single string as argument, now as there are defaults for the colors.
I also propose to left align the text (or to provide optional control)
I see, I'll think about to add more controls... as general idea this region is thinked to be used as a label (a short text) with variable appearance depending on the script events; the table region will be the better solution to have a more customizable (fixed) appearance.

BTW your last example puts me in mind that would be more handy and useful to use the built-in Output window to easily access these infos without calling dedicated functions or looking for log files.
Wroteas general idea this region is thinked to be used as a label (a short text) with variable appearance depending on the script events; the table region will be the better solution to have a more customizable (fixed) appearance.
Off-spec use of features is part of the fun, isn't it?
Wrote
BTW your last example puts me in mind that would be more handy and useful to use the built-in Output window to easily access these infos without calling dedicated functions or looking for log files.
I suppose your proposal impies that the output window can be fed directly from inside plugins. How would I trigger this from outside? How do I identify the output of a particular math region in the midst of a SMath sheet? I can't stop the re-calculation of a sheet at a particular expression, can I?
The maxima plugin has a two-level log inspection feature:
- MaximaLog("all" ) displays the entire Maxima session from the Maxima perspective without translation detail)
- MaximaLog(#) displays the detail of the previous Maxima call including maxima command, maxima response and back-translation.
I found MaximaLog(#) handy to use for documenting bugs in the todo list and it is always close at hand (from the dynamic assistant) in the sheet without the need to open and close the output window.
I must admit that I don't know how to even reach this level of comfort and clearness using the output window. How would you control the output if not by dedicated commands? How would you identify where the output came from? When using trace(), I find myself adding label texts to output commands in order to match the output with the SMath context. But I may just oversee options, thus any ideas are welcome.
Not always (for the developpers) :-pWroteOff-spec use of features is part of the fun, isn't it?
The multiline feature is not easily accessible from the canvas, so the alignment feature would produce confusion (in some way like the resize's grips); BTW if you want a "display region" to send out a well formatted output from the Maxima plugin, you can also make something like the "Maple" region of Viacheslav

WroteI suppose your proposal impies that the output window can be fed directly from inside plugins. How would I trigger this from outside? How do I identify the output of a particular math region in the midst of a SMath sheet? I can't stop the re-calculation of a sheet at a particular expression, can I?
The maxima plugin has a two-level log inspection feature:By positioning the MaximaLog(#) at the right place you can clearly tell what Maxima did in the last interaction, regardless if the call was made by a hijacked function like int(), diff(), sum() or lim(), a dedicated function like Solve() or LinSolve() or directly by a Maxima() command.
- MaximaLog("all" ) displays the entire Maxima session from the Maxima perspective without translation detail)
- MaximaLog(#) displays the detail of the previous Maxima call including maxima command, maxima response and back-translation.
I found MaximaLog(#) handy to use for documenting bugs in the todo list and it is always close at hand (from the dynamic assistant) in the sheet without the need to open and close the output window.
I must admit that I don't know how to even reach this level of comfort and clearness using the output window. How would you control the output if not by dedicated commands? How would you identify where the output came from? When using trace(), I find myself adding label texts to output commands in order to match the output with the SMath context. But I may just oversee options, thus any ideas are welcome.
Sincerely I don't know, I've threw a stone into the pond

Maybe a special context menu item could be added or a log function with canvas free result that enable the output window output, or something else

BTW looking back my previous post Log files are useful for crashes (deep debugging -> plugin's developpers)
- Fixed regional settings issues with Font sizes (comma decimal separator related*)
* Martin's activebook svn file updated
WroteMartin's activebook svn file updated
Great, thanks. I also updated the barchart example.
- SMath Studio 0.96.5146 required
best regards,
Davide
Where can I download the Formatting Label for 4909 versión?
with new version I can´t open old snippets

WroteHello !
Where can I download the Formatting Label for 4909 versión
You can use the portable version provided by mkraska (here) directly or copying the plugin from that distribution to your %APPDATA% folder
-
New Posts
-
No New Posts