Indenting Challenge
Hi List: Was hoping someone here might have some uncanny insight into how to solve a text formatting dilemma... Basic problem: I need to create two levels on indenting in a block of text, but the text needs to always be directly editable and may span multiple lines. About a month or so back I mentioned an app I was working on that was sort of a poor man's PowerPoint, and was trying to mimic the bullet formatting one can apply to text. I've been asked to implement two levels bulleting/indenting, something like the following (hope it comes across): Main Bullet Item 1 that spans multiple lines Main Bullet Item 2 - Secondary Bullet 1 - Secondary Bullet 2 which spans multiple lines - Secondary Bullet 3 Main Bullet Item 3 I can accomplish the first level bullet/indenting using a combination of margins and firstIndent, but I can't figure out a way to handle second level. To date I've been using HTMLtext and non-breaking spaces to pad the secondary level lines, but arbitrarily adding spaces to live editable text is messy, and I can't find a way to align a padded+wrapped line with the line above it. It occurred to me maybe there's some non-typeable, non-selectable character I could use for padding, but I only know of formFeed/lineFeed characters which wouldn't help here. And the thing that really makes this difficult is the fact that the text needs to be directly editable by users (cannot be in a locked field). Any suggestions on how I might tackle this? Thanks Regards, Scott Rossi Creative Director Tactile Media, UX Design ___ use-revolution mailing list use-revolution@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-revolution
Re: Indenting Challenge
I haven't thought this through, but . there are only 3 (or maybe 4) different indent cases. create a suitable image for each case (i.e. normal, bulletted, 2nd level, continuation, etc.) which is blank space of the appropriate number of pixels wide then insert an extra character at the start of each line, and set the imagesource of that first character according according to what kind of line it is -- Alex. On 09/11/2010 18:39, Scott Rossi wrote: Hi List: Was hoping someone here might have some uncanny insight into how to solve a text formatting dilemma... Basic problem: I need to create two levels on indenting in a block of text, but the text needs to always be directly editable and may span multiple lines. About a month or so back I mentioned an app I was working on that was sort of a poor man's PowerPoint, and was trying to mimic the bullet formatting one can apply to text. I've been asked to implement two levels bulleting/indenting, something like the following (hope it comes across): € Main Bullet Item 1 that spans multiple lines € Main Bullet Item 2 - Secondary Bullet 1 - Secondary Bullet 2 which spans multiple lines - Secondary Bullet 3 € Main Bullet Item 3 I can accomplish the first level bullet/indenting using a combination of margins and firstIndent, but I can't figure out a way to handle second level. To date I've been using HTMLtext and non-breaking spaces to pad the secondary level lines, but arbitrarily adding spaces to live editable text is messy, and I can't find a way to align a padded+wrapped line with the line above it. It occurred to me maybe there's some non-typeable, non-selectable character I could use for padding, but I only know of formFeed/lineFeed characters which wouldn't help here. And the thing that really makes this difficult is the fact that the text needs to be directly editable by users (cannot be in a locked field). Any suggestions on how I might tackle this? Thanks Regards, Scott Rossi Creative Director Tactile Media, UX Design ___ use-revolution mailing list use-revolution@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-revolution ___ use-revolution mailing list use-revolution@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-revolution
Re: Indenting Challenge
Hi Scott. Unless you can find a way to embed a Microsoft object into a Revolution stack (never mind a standalone) I don't think there is a way to do this. Unless CSS is supported in HTMLText, I don't see how you can get any kind of special formatting to work in a native LiveCode field. Now if CSS WAS supported, that would be a different matter. Does the Revbrowser support CSS? If so, then if you only needed one field on a form that might work for you. Bob On Nov 9, 2010, at 10:39 AM, Scott Rossi wrote: Hi List: Was hoping someone here might have some uncanny insight into how to solve a text formatting dilemma... Basic problem: I need to create two levels on indenting in a block of text, but the text needs to always be directly editable and may span multiple lines. About a month or so back I mentioned an app I was working on that was sort of a poor man's PowerPoint, and was trying to mimic the bullet formatting one can apply to text. I've been asked to implement two levels bulleting/indenting, something like the following (hope it comes across): • Main Bullet Item 1 that spans multiple lines • Main Bullet Item 2 - Secondary Bullet 1 - Secondary Bullet 2 which spans multiple lines - Secondary Bullet 3 • Main Bullet Item 3 I can accomplish the first level bullet/indenting using a combination of margins and firstIndent, but I can't figure out a way to handle second level. To date I've been using HTMLtext and non-breaking spaces to pad the secondary level lines, but arbitrarily adding spaces to live editable text is messy, and I can't find a way to align a padded+wrapped line with the line above it. It occurred to me maybe there's some non-typeable, non-selectable character I could use for padding, but I only know of formFeed/lineFeed characters which wouldn't help here. And the thing that really makes this difficult is the fact that the text needs to be directly editable by users (cannot be in a locked field). Any suggestions on how I might tackle this? Thanks Regards, Scott Rossi Creative Director Tactile Media, UX Design ___ use-revolution mailing list use-revolution@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-revolution ___ use-revolution mailing list use-revolution@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-revolution
Re: Indenting Challenge
And the thing that really makes this difficult is the fact that the text needs to be directly editable by users (cannot be in a locked field). Any suggestions on how I might tackle this? Can it be restricted to only editing one bullet at a time, or does the user need the ability to click in one bullet's text and drag up or down and select the text from other bullets as well? The reason I ask is that you might be able to get away with a highly customized datagrid - since each row is its own field, you could apply the margins/indents you want - plus you could have the expand/collapse toggle available as well. I haven't done this myself, but maybe it's a possible direction to try. Ken Ray Sons of Thunder Software, Inc. Email: k...@sonsothunder.com Web Site: http://www.sonsothunder.com/ ___ use-revolution mailing list use-revolution@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-revolution
Re: Indenting Challenge
The firstIndent property of the field can be set to a negative number, but that would only take care of one level of indenting. -- Richard Gaskin Fourth World LiveCode training and consulting: http://www.fourthworld.com Webzine for LiveCode developers: http://www.LiveCodeJournal.com LiveCode Journal blog: http://LiveCodejournal.com/blog.irv ___ use-revolution mailing list use-revolution@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-revolution
Re: Indenting Challenge
Sorry missed this part. Not sure if CSS supports hanging indents, which is I think what you are shooting for. Bob On Nov 9, 2010, at 10:39 AM, Scott Rossi wrote: I can accomplish the first level bullet/indenting using a combination of margins and firstIndent, but I can't figure out a way to handle second level. To date I've been using HTMLtext and non-breaking spaces to pad the secondary level lines, but arbitrarily adding spaces to live editable text is messy, and I can't find a way to align a padded+wrapped line with the line above it. ___ use-revolution mailing list use-revolution@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-revolution
Re: Indenting Challenge
On 9 Nov 2010, at 18:39, Scott Rossi wrote: snip I've been asked to implement two levels bulleting/indenting, something like the following (hope it comes across): • Main Bullet Item 1 that spans multiple lines • Main Bullet Item 2 - Secondary Bullet 1 - Secondary Bullet 2 which spans multiple lines - Secondary Bullet 3 • Main Bullet Item 3 I can accomplish the first level bullet/indenting using a combination of margins and firstIndent, but I can't figure out a way to handle second level. To date I've been using HTMLtext and non-breaking spaces to pad the secondary level lines, but arbitrarily adding spaces to live editable text is messy, and I can't find a way to align a padded+wrapped line with the line above it. It occurred to me maybe there's some non-typeable, non-selectable character I could use for padding, but I only know of formFeed/lineFeed characters which wouldn't help here. And the thing that really makes this difficult is the fact that the text needs to be directly editable by users (cannot be in a locked field). Any suggestions on how I might tackle this? Is it feasible to dynamically create separate text fields for the different levels? I've done it before for display purposes, but I'm sure managing live editing adds a lot of problems. But if you could define a routine that dynamically lays out the text fields vertically as you type (so that if one field grows/shrinks by a line, the fields below dynamically adjust their positions), and clearly define which actions require creating a new text field or deleting an existing one, it might be feasible. Or you could wait for improved field formatting. :-) Cheers Dave___ use-revolution mailing list use-revolution@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-revolution
Re: Indenting Challenge
Knowing nothing about CSS or HTML, I was able to get a text field to respond to a basic CSS definition. However, it doesn't seem to pay any attention to the margins and indents. Feature request anyone? Bob On Nov 9, 2010, at 10:39 AM, Scott Rossi wrote: Hi List: Was hoping someone here might have some uncanny insight into how to solve a text formatting dilemma... Basic problem: I need to create two levels on indenting in a block of text, but the text needs to always be directly editable and may span multiple lines. About a month or so back I mentioned an app I was working on that was sort of a poor man's PowerPoint, and was trying to mimic the bullet formatting one can apply to text. I've been asked to implement two levels bulleting/indenting, something like the following (hope it comes across): • Main Bullet Item 1 that spans multiple lines • Main Bullet Item 2 - Secondary Bullet 1 - Secondary Bullet 2 which spans multiple lines - Secondary Bullet 3 • Main Bullet Item 3 I can accomplish the first level bullet/indenting using a combination of margins and firstIndent, but I can't figure out a way to handle second level. To date I've been using HTMLtext and non-breaking spaces to pad the secondary level lines, but arbitrarily adding spaces to live editable text is messy, and I can't find a way to align a padded+wrapped line with the line above it. It occurred to me maybe there's some non-typeable, non-selectable character I could use for padding, but I only know of formFeed/lineFeed characters which wouldn't help here. And the thing that really makes this difficult is the fact that the text needs to be directly editable by users (cannot be in a locked field). Any suggestions on how I might tackle this? Thanks Regards, Scott Rossi Creative Director Tactile Media, UX Design ___ use-revolution mailing list use-revolution@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-revolution ___ use-revolution mailing list use-revolution@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-revolution
Re: Indenting Challenge
And the thing that really makes this difficult is the fact that the text needs to be directly editable by users (cannot be in a locked field). Any suggestions on how I might tackle this? Can it be restricted to only editing one bullet at a time, or does the user need the ability to click in one bullet's text and drag up or down and select the text from other bullets as well? The reason I ask is that you might be able to get away with a highly customized datagrid - since each row is its own field, you could apply the margins/indents you want - plus you could have the expand/collapse toggle available as well. I haven't done this myself, but maybe it's a possible direction to try. I vote for this one. Each row of the datagrid would become a paragraph and you could apply styles, indents, whatever you want. You would just need to implement row creation on returnInField with indent inherited from the current row, resizing on keyup and support arrowkeying between the end of the text in one row and the start of the text in the next. Cheers Monte___ use-revolution mailing list use-revolution@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-revolution