Message Boards Message Boards

0
|
4019 Views
|
0 Replies
|
0 Total Likes
View groups...
Share
Share this post:

Styling for FormPage of Cloud Deploy?

Posted 8 years ago

I am looking for formatting control over FormPage.

Here are three things that I would like to do but cannot figure out how to do so. Help and hints are appreciated!

.1. I would like to format the text and so forth as a base or global style. This would be similar to BaseStyle of Column[]. Two examples of what seem like should be possible follow:

    1a. CloudDeploy[Style[FormPage["x"->"Number",#x&],FontFamily->"Arial"]]
    1b. CloudDeploy[FormPage["x"->"Number",#x&,BaseStyle->{FontFamily->"Arial"}]]

[What is possible is: CloudDeploy[FormPage[{"x",Style["x",FontFamily->"Arial"]}->"Number",#x&]]. This formulation is cumbersome for complex FormObjects, so I am looking for a global setting.]

.2. The "Result" section of FormPage[] seems always to be center-justified. I would like the "Result" to be left-justified in its container. To be clear, it is possible to justify the contents of "Result" (as below) but it does not seem possible to justify the container in which those results appear. This is a bit awkward in appearance since "Form" is left-justified but "Result" is center-justified.

    2a. CloudDeploy[FormPage["x"->"Number",Column[{"Result",#x},Alignment->Right]&]]
    2b. CloudDeploy[FormPage["x"->"Number",ExportForm[Column[{"Result",#x},Alignment->Right],"GIF"]&]]

.3. Control over image resolution and size. Items 3a and 3b give identical results but should not since ImageSize is 150 vs 300. Item 3c shows that resolution also gives no effect. Items 3d-3g shows some limited control but image size and ImageResolution do not scale separately; they scale in lock step, meaning a high resolution, small size image cannot be displayed (rather to state more precisly: I myself cannot figure out how to do and I hope help from community will show me how to do it).

    3a. CloudDeploy[FormPage["x"->"Number",#x&,AppearanceRules->{"Title"->ExportForm[Rasterize["MyTitle",ImageResolution->300],"GIF",ImageSize->150]}]]
    3b. CloudDeploy[FormPage["x"->"Number",#x&,AppearanceRules->{"Title"->ExportForm[Rasterize["MyTitle",ImageResolution->300],"GIF",ImageSize->300]}]]
    3c. CloudDeploy[FormPage["x"->"Number",#x&,AppearanceRules->{"Title"->ExportForm[Rasterize["MyTitle",ImageResolution->600],"GIF",ImageSize->300]}]]
    3d. CloudDeploy[FormPage["x"->"Number",#x&,AppearanceRules->{"Title"->ExportForm[Image[Rasterize["MyTitle",ImageResolution->150],ImageResolution->300],"GIF"]}]]
    3e. CloudDeploy[FormPage["x"->"Number",#x&,AppearanceRules->{"Title"->ExportForm[Image[Rasterize["MyTitle",ImageResolution->300],ImageResolution->150],"GIF"]}]]
    3f. CloudDeploy[FormPage["x"->"Number",#x&,AppearanceRules->{"Title"->ExportForm[Image[Rasterize["MyTitle",ImageResolution->300],ImageResolution->75],"GIF"]}]]
    3g. CloudDeploy[FormPage["x"->"Number",#x&,AppearanceRules->{"Title"->ExportForm[Image[Rasterize["MyTitle",ImageResolution->75],ImageResolution->75],"GIF"]}]]

Thank you for your time and hints! I look forward to making some beautifully formated FormPage[]'s after I get your key hints on topics above.

POSTED BY: Scot Martin
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract