Option Button in a Datagrid

Peter Haworth pete at lcsql.com
Fri Oct 26 11:30:39 CDT 2012


Hi Glen,
I don't recall seeing that behavior but it's been quite a while since I was
working on this issue.  In fact, I came across it when working on my
SQLiteAdmin program which I believe you have.  You might want to check out
how it behaves.

Go to the Browse screen, select a table, then select New Filter from the
filter menu.  In the lower of the two datagrids, there is a column named
"Operator" with an option menu in it.  Play around with that and let me
know if it behaves in the same way as your datagrid column.  If it doesn't
show the problem you're having, I'll take a look at the code and see if I
can spot anything.

Pete
lcSQL Software <http://www.lcsql.com>



On Thu, Oct 25, 2012 at 7:06 PM, Glen Bojsza <gbojsza at gmail.com> wrote:

> Hi Pete,
>
> Yes this does work... all the text is readable!
>
> The only side effect is that after making a selection from an option box is
> that the hilite of the box remains ie the option box has a white background
> --> user makes selection --> the background color of the box remains
> hilited (in my case a dark blue) where as it should return to white.
>
> After playing with three rows with option buttons I find that sometimes a
> button will go back to a white background but it is not consistently
> reproducible.
>
> Have you seen this before? It happens in either case if the line is the
> current line or when the line is not the current line.
>
> At least for now it is functional next is to get a consistent look.
>
> thanks,
>
> Glen
>
> On Thu, Oct 25, 2012 at 9:12 PM, Peter Haworth <pete at lcsql.com> wrote:
>
> > Hi Glen,
> > Are you on Windows?  IF so, I ran into this a few months back.  I filed
> bug
> > report# 9993 about it and got the following reply from the QCC:
> >
> > "Having had a look at your project, I think I've spotted the issue. It
> > appears to be that the dataGrid property dgProp["hilited text color"] is
> > setting the foreground color of your dropDown menu to white, causing
> > unhighlighted options to blend into the background.
> >
> > Either set the property to a different color or edit the "setprop
> > dgHilite" handler in the columns behavior."
> >
> >
> > Here's what I did to fix it.  Check the Datagrid manual for how to set
> > up a column behavior script for your option menu columns.  When you've
> > done that, find the "setprop dgHilite" handler and change it so only
> > the "set the foregroundcolor of me to empty" line is in there, in
> > other words get rid of the if statement.
> >
> > That fixed it for me, hope it works for you.
> >
> > Pete
> > lcSQL Software <http://www.lcsql.com>
> >
> >
> >
> > On Thu, Oct 25, 2012 at 5:42 PM, Glen Bojsza <gbojsza at gmail.com> wrote:
> >
> > > Hi Mark,
> > >
> > > As I mentioned, adding the option button and it working is fine. It's
> the
> > > hilite that causes the problem on not being able to read the text in
> the
> > > option button.
> > >
> > > Someone must have found this before?
> > >
> > > As a work around I could disable the auto hilite for the datagrid and
> > add a
> > > selection column but this should not be the way to do things.
> > >
> > > Glen
> > >
> > > On Thu, Oct 25, 2012 at 7:48 PM, Mark Schonewille <
> > > m.schonewille at economy-x-talk.com> wrote:
> > >
> > > > Hi Glen,
> > > >
> > > > You can add a locked field to a datagrid and show a popup button when
> > the
> > > > user clicks on that field. I presume the popup button needs to
> contain
> > a
> > > > script that puts the chosen value into the field. Because the popup
> > > button
> > > > doesn't need to be part of the datagrid, I expect no problems with
> > > hilites
> > > > etc.
> > > >
> > > > --
> > > > Best regards,
> > > >
> > > > Mark Schonewille
> > > >
> > > > Economy-x-Talk Consulting and Software Engineering
> > > > Homepage: http://economy-x-talk.com
> > > > Twitter: http://twitter.com/xtalkprogrammer
> > > > KvK: 50277553
> > > >
> > > > Use Color Converter to convert CMYK, RGB, RAL, XYZ, H.Lab and other
> > > colour
> > > > spaces. http://www.color-converter.com
> > > >
> > > >
> > > >
> > > > On 25 okt 2012, at 16:07, Glen Bojsza wrote:
> > > >
> > > > > Hello,
> > > > >
> > > > > I want to add an option button to a column in a datagrid... this is
> > > not a
> > > > > problem except when a user tries to use it.
> > > > >
> > > > > The choices are are there and the drop down works but you can read
> > the
> > > > text
> > > > > in the drop down.
> > > > >
> > > > > If you turn off auto hilite for the datagrid then everything with
> the
> > > > > option button is fine but then you can't allow the user to visually
> > > > select
> > > > > a line.
> > > > >
> > > > > Is there another way of having the text in the option button to
> show
> > as
> > > > > normal and allow for auto hilite of the line in a datagrid?
> > > > >
> > > > > thanks,
> > > >
> > > >
> > > > _______________________________________________
> > > > use-livecode mailing list
> > > > use-livecode at 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 at 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 at 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 at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
>


More information about the use-livecode mailing list