Re: greying out columns in a dataGrid
Hi Hershel, A possible solution consists to add this handler in the datagrid group script: *command* DG_ColorColumn pColName, pColor, pInk * set* the opaque of grp pColName of me to (pColor is not empty) set the backcolor of grp pColName of me to pColor set the ink of grp pColName of me to pInk *end* DG_ColorColumn Then, call this handler that way: *on* mouseUp dispatch "DG_ColorColumn" to grp "datagrid 1" with "col 2", "211,211,211", "srcCopy" *end* mouseUp Best Regards, On Thu, 30 Nov 2023 at 22:49, Paul Dupuis via use-livecode < use-livecode@lists.runrev.com> wrote: > On 11/30/2023 4:41 PM, Hershel F via use-livecode wrote: > > sorry my mistake. does not have to be greyed out should be a gray color. > > or to rephrase the question properly, how the change the color to gray? > > Ah! I am pretty sure it can be done, but I do not know how to do it > exactly. By guess is that you will probably need to edit the row > template to add a "grey" background behind the columns your may want to > grey and then for those columns in the Property inspector, create a > custom column behavior to show or hide that grey background graphic > based on whatever calculation your want. > > That is a guess though. > ___ > use-livecode mailing list > use-livecode@lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your > subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode > -- Zryip TheSlug http://www.aslugontheroad.com ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Re: greying out columns in a dataGrid
On 11/30/2023 4:41 PM, Hershel F via use-livecode wrote: sorry my mistake. does not have to be greyed out should be a gray color. or to rephrase the question properly, how the change the color to gray? Ah! I am pretty sure it can be done, but I do not know how to do it exactly. By guess is that you will probably need to edit the row template to add a "grey" background behind the columns your may want to grey and then for those columns in the Property inspector, create a custom column behavior to show or hide that grey background graphic based on whatever calculation your want. That is a guess though. ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Re: greying out columns in a dataGrid
sorry my mistake. does not have to be greyed out should be a gray color. or to rephrase the question properly, how the change the color to gray? thanks , Hershel > On Nov 30, 2023, at 4:36 PM, Paul Dupuis via use-livecode > wrote: > > Usually, you do not disable or grey-out columns in a Datagrid, but make them > invisible (hide or show the column) if they are not applicable to some view > you want. > > On 11/30/2023 4:04 PM, Hershel F via use-livecode wrote: >> Hi all how is it done to grey out a column or multiple columns in data grid >> according a calculation? >> >> thanks, Hershel >> ___ >> use-livecode mailing list >> use-livecode@lists.runrev.com >> Please visit this url to subscribe, unsubscribe and manage your subscription >> preferences: >> http://lists.runrev.com/mailman/listinfo/use-livecode > > > ___ > use-livecode mailing list > use-livecode@lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your subscription > preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Re: greying out columns in a dataGrid
Usually, you do not disable or grey-out columns in a Datagrid, but make them invisible (hide or show the column) if they are not applicable to some view you want. On 11/30/2023 4:04 PM, Hershel F via use-livecode wrote: Hi all how is it done to grey out a column or multiple columns in data grid according a calculation? thanks, Hershel ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Re: resizeControl wishes...
On 11/30/2023 2:20 PM, Brian Milby via use-livecode wrote: Groups get the message when resize happens by script. Other objects only receive the message when resized by hand. Brian Milby br...@milby7.com Except, the "PowerButton" widget actually receives "resizeControl" just as a group does when its rect is changed by script control (as well as by user manipulation of its resize handles). So it *is* inconsistent. Or, at the very least, poorly documented. And, for my purposes, if the PowerButton can received a resizeControl handler, I'd really like to see the PDF widget get the message also. The XPDF external requires, as its target for a drawing area, a Graphic inside a Group, and the containing group gets resizeControl. You can use that resizeControl to show/hide scrollbars as appropriate based on zoom; set the scroll to keep a highlighted part of the PDF in view when resized; and more. For a migration path from the XPDF External to the PDF Widget, the PDF Widget should support resizeControl as well. ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
greying out columns in a dataGrid
Hi all how is it done to grey out a column or multiple columns in data grid according a calculation? thanks, Hershel ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Re: Your scripts as a flowchart
Hi all, Finally I can answer Yes to the question on exporting script flowcharts! New version of WIS_ScriptDependencies available: v1.1.5 (30 Nov 2023) - Enhancement: Flowcharts can now be produced and exported as PNG or SVG. On Windows and Linux the flowchart is now always displayed in-stack, as a PNG. On all platforms the flowchart can be exported as PNG, SVG and HTML. - Enhancement: Node text size can now be set - Adjustment: Handler type naming convention changed in LC10 (apparently), making ”M” mean ”on” and ”C” mean ”command” (and changing ”PM” into ”CM” for ”private command”). This is now correctly handled when using WIS_ScriptDependencies in either LC9 or LC10. - Fixed bug: Arrow colouring failed for private commands/functions - Fixed bug: The (rarely used) constructions ”before *command name*” and ”after *command name*” now get included in analysis and flowchart (displayed as ”command *command name*”). - Other minor fixes Download link: https://github.com/wheninspace/WIS_ScriptDepedencies/releases/latest /Andreas > 18 sep. 2023 kl. 03:38 skrev Geoff Canyon via use-livecode > : > > Is there a way to export the entire flowchart, instead of just the portion > currently displayed? ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Re: resizeControl wishes...
Groups get the message when resize happens by script. Other objects only receive the message when resized by hand. Brian Milby br...@milby7.com > On Nov 30, 2023, at 1:51 PM, Paul Dupuis via use-livecode > wrote: > > Thank you Richard. > > I see what the issue for me was. Groups do indeed receive a resizeControl > message automatically if the rect is changed by script. However, the message > (resizeControl) use seems inconsistent. For example, while a group does > received the resizeControl message, a field does not seem to. Also, what I > specifically ran into was that the PDF Widget does not received a > resizeControl handler (and it would be really useful if it did!) > > I'll submit an enhancement request (below) for adding resizeControl to the > PDF Widget (assuming it's possible), but I don't have the time to determine > what widgets support resizeControl and which don't and what LC objects (other > than groups) support resizeControl and which don't. > > https://quality.livecode.com/show_bug.cgi?id=24437 > > ___ > use-livecode mailing list > use-livecode@lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your subscription > preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Re: resizeControl wishes...
Thank you Richard. I see what the issue for me was. Groups do indeed receive a resizeControl message automatically if the rect is changed by script. However, the message (resizeControl) use seems inconsistent. For example, while a group does received the resizeControl message, a field does not seem to. Also, what I specifically ran into was that the PDF Widget does not received a resizeControl handler (and it would be really useful if it did!) I'll submit an enhancement request (below) for adding resizeControl to the PDF Widget (assuming it's possible), but I don't have the time to determine what widgets support resizeControl and which don't and what LC objects (other than groups) support resizeControl and which don't. https://quality.livecode.com/show_bug.cgi?id=24437 ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Re: resizeControl wishes...
Craig Newman wrote: > “reSizeControl” is a message. What I mean by that is if you are already > running under script control, why do you need to send such a message at > all? Can’t your handler do whatever you needed to if the user did the > actual resize action? He's asking about resizing that takes place outside of direct user interaction with the pointer tool, such as during a resizeStack event. Paul Dupuis wrote: > resizeControl is sent "only sent when the user resizes a control by > dragging its handles. It is not sent if a handler changes the size > of a control by changing its properties (width, height, and so on)." That appears to be a documentation bug. IIRC the change you're looking for was introduced way back when the DataGrid premiered. Without it the DG wouldn't be able to cleanly update its internal groups. Here's a simple test stack confirming the change: https://fourthworld.net/lc/Resize%20Confirmation.livecode -- Card script: on resizeStack set the rect of grp 1 to the rect of this cd end resizeStack -- Group script: on resizeControl put item 2 of the loc of this card into tMid set the rect of fld 1 to the left of me,the top of me,the right of me,tMid set the rect of fld 2 to the left of me, tMid, the right of me, the bottom of me end resizeControl Tip: Set the lockLoc of such groups to true, to override the engine's default behavior of adjusting group size to fit contents. Now that the engine sends resizeControl to groups under both user interaction and script directive, handling the resizeStack message is MUCH easier than before. Among other things, it lets you encapsulate code within groups for reuse. But even if your groups are one-offs not needed elsewhere, the benefits of encapsulating the LOGIC of putting things where you want them is immense. It's so much easier to express the placement of objects within a group than relative to the group within a card. I'd guess that not having this sooner, and not documenting it after delivery, may contribute to the cottage industry of clck-click-click-click-click-click-click-click-click-click options for handling resizing with things like the Geometry Manager and various other tools and options. All of them are utimately responding to the resizeStack message, but in a generalized way that adds a large layer of complexity, and sometimes uncertainty. Handling resizeStack directly is with-the-grain; it uses the power of the engine to its most efficient, preditable, and robust advangage to put things exactly where you want them. -- Richard Gaskin FourthWorld.com ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Re: resizeControl wishes...
On 30/11/2023 16:05, Paul Dupuis via use-livecode wrote: resizeControl is sent "only sent when the user resizes a control by dragging its handles. It is not sent if a handler changes the size of a control by changing its properties (width, height, and so on)." Basically, that dictionary entry is wrong. If you *change* the size of a group by script, then that group *does* receive a resizeControl message. Note that it does *not* receive a mesage just because the rect changes - only if the size changes. So if you do something like repeat 10 times add 1 to X set the rect of grp "A" to X,Y, X+100, Y+100 end repeat then grp "A" will get either 0 or 1 message (from the first time through the loop). If you do repeat 10 times add 1 to X set the rect of grp "A" to 100,Y, X+100, Y+100 end repeat it will receive either 9 or 10 messages. So, essentially I think, your wish is already true :-) Alex. (Yes, tested pretty thoroughly in 10.0DP6 but I believe also true in earlier versions; I had to re-test this two days ago while playing with the recent benchmarking of groups vs cards). ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Re: resizeControl wishes...
Paul. “reSizeControl” is a message. What I mean by that is if you are already running under script control, why do you need to send such a message at all? Can’t your handler do whatever you needed to if the user did the actual resize action? Craig > On Nov 30, 2023, at 11:05 AM, Paul Dupuis via use-livecode > wrote: > > resizeControl is sent "only sent when the user resizes a control by dragging > its handles. It is not sent if a handler changes the size of a control by > changing its properties (width, height, and so on)." > > Does anyone else really really wish that resizeControl was set when the > control's size is changed via script? I sure do! > > For example, I have cards with multiple groups of objects on them. Each of my > groups (and sometimes sub-groups) have resizeControl handlers that position > everything in the groups appropriately. I do this for portability. If I copy > the group to somewhere else, the handler (resizeControl) that knows how > everything is to be moved and resized goes with the copied group. > > My card script has a "resizeStack" handler that just sets the rects of the > top level groups and dispatches resizeControl to each group on the card after > changing its rect. I really wish I could eliminate these "dispatch" (or send) > commands. I forget to include them some times, simple expecting (even though > I know better) that if I change the size (rect) of a control with a > "resizeControl" handler, that that resizeControl handler should execute! > > Anyone else wish that resizeControl would get executed if a control's size is > changed by script? It just seems counter-intuitive that it does not. > > ___ > use-livecode mailing list > use-livecode@lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your subscription > preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
resizeControl wishes...
resizeControl is sent "only sent when the user resizes a control by dragging its handles. It is not sent if a handler changes the size of a control by changing its properties (width, height, and so on)." Does anyone else really really wish that resizeControl was set when the control's size is changed via script? I sure do! For example, I have cards with multiple groups of objects on them. Each of my groups (and sometimes sub-groups) have resizeControl handlers that position everything in the groups appropriately. I do this for portability. If I copy the group to somewhere else, the handler (resizeControl) that knows how everything is to be moved and resized goes with the copied group. My card script has a "resizeStack" handler that just sets the rects of the top level groups and dispatches resizeControl to each group on the card after changing its rect. I really wish I could eliminate these "dispatch" (or send) commands. I forget to include them some times, simple expecting (even though I know better) that if I change the size (rect) of a control with a "resizeControl" handler, that that resizeControl handler should execute! Anyone else wish that resizeControl would get executed if a control's size is changed by script? It just seems counter-intuitive that it does not. ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode