Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependents: oldheating gps motorhome heating
Diff: page/page.c
- Revision:
- 56:f6e814fe0159
- Parent:
- 46:1822fdbe6c0c
- Child:
- 57:8fa31ff4e773
diff -r 3d1e52e3e9b7 -r f6e814fe0159 page/page.c
--- a/page/page.c Tue Mar 05 16:57:03 2019 +0000
+++ b/page/page.c Wed Mar 06 11:43:29 2019 +0000
@@ -179,11 +179,20 @@
snprintf(text, sizeof(text), "%d", value);
PageAddTextInput(action, width, label, labelwidth, name, inputwidth, text);
}
-void PageAddCheckInput(char* action, char* label, char* name, char* button)
+void PageAddCheckInput(char* action, char* label, float labelwidth, char* name, char* button)
{
+ char text[100];
HttpAddText("<form action='"); HttpAddText(action); HttpAddText("' method='get'>\r\n");
HttpAddText("<input type='hidden' name='"); HttpAddText(name); HttpAddText("'>\r\n");
- HttpAddText(label); HttpAddText("\r\n");
+ if (labelwidth < 0.1)
+ {
+ HttpAddText(label); HttpAddText("\r\n");
+ }
+ else
+ {
+ snprintf(text, sizeof(text), "<div style='width:%.1fem; display:inline-block;'>%s</div>\r\n", labelwidth, label);
+ HttpAddText(text);
+ }
HttpAddText("<input type='submit' value='"); HttpAddText(button); HttpAddText("'>\r\n");
HttpAddText("</form>\r\n");
}