O7 : Changing color in table
todd aron, senior developer, software development
taron at competitrack.com
Thu Jan 7 12:33:40 EST 2010
are you using windows?
you want to keep the color of the line when the user selects it?
hmmm never done that before; alas, no time to try (we're always under
the gun here, w/ stack of stuff to do). the sim[ple case previously
supplied doesn't show the kRed when selecting line, alas.
if i were to try, tho, would put an "if #click..." under the table (the
assumption is that every time a user changes his/her selection there
will be a click involved) and recolor that line, returning deselected
lines to the standard color.
then, try combinations of colors until it comes out as you like it.
rather than hit and miss, perhaps set up a proc that goes thru the
$forecolor/$backcolor combos until you find one you like.
game plan:
- populate your list.
- select one or more lines
- cycle thru different $backcolor/$forecolor combinations until you find
what you want. you can do this w/ a loop and, say, "yes/no" message OR
pausing N seconds, or such.
you may want to select several lines, and color them w/ different
combinations.
On 1/7/2010 5:28 AM, a a wrote:
> Hello
>
> Thanks for your help
> But I try your code without success
>
> I'm not in enterdata mode
> My list must be selectable and not enterable
> I want to keep the color of the when i select the line
>
> I test with $style (kbold) and the style is still good when I select the line
>
> Thanks
>
>
> --- En date de : Mar 5.1.10, todd aron, senior developer, software development<taron at competitrack.com> a écrit :
>
>
> De: todd aron, senior developer, software development<taron at competitrack.com>
> Objet: Re: O7 : Changing color in table
> À: "OmnisDev List - English"<omnisdev-en at lists.omnis-dev.com>
> Date: Mardi 5 Janvier 2010, 21h33
>
>
> perhaps this will be helpful; this was something passed along by Mischa
> so many years ago, and has worked well for me many, many places.
>
> it keeps the color scheme chosen by the user.
>
> following is my implementation:
>
>> Local variable vkBackpatternDisabled (Long integer) = 16
>> Local variable vkBackpatternEnabled (Long integer) = 1
>> Local variable vkForecolorDisabled (Long integer) = 300
>> Local variable vkForecolorEnabled (Long integer) = 1
> ...
>> Calculate $cwind.$objs.1033.$enabled as mModeFind|mModeNew
>> Calculate $cwind.$objs.1033.$backpattern as pick($cwind.$objs.1033.$enabled,vkBackpatternDisabled,vkBackpatternEnabled)
>> Calculate $cwind.$objs.1033.$forecolor as pick($cwind.$objs.1033.$enabled,vkForecolorDisabled,vkForecolorEnabled)
>
> its easy to set up a window to do this generically, say, based on a
> code/prefix in the $name. i've done that and it works well when you add
> fields to your window.
>
> of course, the konstants should be something of a greater scope than local.
>
> On 1/5/2010 4:15 AM, a a wrote:
>> Hello Jim
>>
>> You're right
>>
>> It was $backcolor
>>
>> But the effect is not perfect because when I select the line, the color changes in gray
>>
>> I want to keep the difference of color even if if select the line
>>
>> I try with $texcolor but the color changes in gray
>>
>> Have you an idea to keep the $texcolor ?
>>
>> Thanks
>>
>> --- En date de : Mar 5.1.10, Jim Creak<jim at jacsoft.co.nz> a écrit :
>>
>>
>> De: Jim Creak<jim at jacsoft.co.nz>
>> Objet: Re: O7 : Changing color in table
>> À: "OmnisDev List - English"<omnisdev-en at lists.omnis-dev.com>
>> Date: Mardi 5 Janvier 2010, 9h46
>>
>>
>> Things to try:
>>
>> Have you tried leaving the table Enterable, but disable $active
>>
>> Have you tried leaving the table Enterable, and setting the Row objs
>> to be Non-Enterable.
>>
>> Have you tried changing .$backcolor ? I tend to do both to make sure
>> I get the colour I want:
>> calculate VF_Ref(1198,1).$backcolor as 8
>> calculate VF_Ref(1198,1).$forecolor as 8
>> Of course if you have set the pattern right it is not an issue, but
>> I have used this for both enterable and display items.
>>
>> Other things to check:
>>
>> Have you got two fields on top of each other
>> Is your item a Background obj? (Then use Set reference VF_Ref as
>> $cwind.$objs.1197.$tabrbobjs)
>>
>> Thanks
>> Jim
>>
>> JACSoft Programming Ltd.
>>
>>
>>
>>
>>
>> On 5/01/2010, at 2:37 AM, a a wrote:
>>
>>> Hello
>>>
>>> I want to change color of a field in a line of a table
>>>
>>> I use this
>>>
>>> Set reference VF_Ref to $cwind.$objs.1197.$tabrobjs
>>> Calculate VF_Ref(1198;1).$forecolor as 8
>>>
>>> This work only if my table is ENTERABLE
>>>
>>> How can I do this in a non enterable table ?
>>>
>>> Thanks
>>>
>>>
>>>
>>> _____________________________________________________________
>>> Manage your list subscriptions at http://lists.omnis-dev.com
>>
>> _____________________________________________________________
>> Manage your list subscriptions at http://lists.omnis-dev.com
>>
>>
>>
>>
>> _____________________________________________________________
>> Manage your list subscriptions at http://lists.omnis-dev.com
>>
>
--
be well,
todd
x106
todd ARON p 718.482.4206
Competitrack f 718.482.4286
36-36 33rd st, suite 501 <taron at competitrack.com>
long island city, NY 11106 <http://www.competitrack.com/>
-= Jonna Lea =-
<http://www.facebook.com/photo.php?pid=30811748&l=039c01f396&id=1427923354>
<http://www.facebook.com/album.php?aid=2043422&id=1427923354&l=e408eeee57>
<http://www.facebook.com/photo.php?pid=30833205&l=e795f020fc&id=1427923354>
-= recommended tools =-
diff tool: WinMerge
images: irfanview, faststone, and paintDotNet
text editor: Notepad++, EditPad Pro
moi:
<http://www.facebook.com/album.php?aid=2015465&id=1427923354&l=b7c6a>
fun:
<http://www.inventgeek.com/Projects/paintball-turret/overview.aspx>
<http://www.engadget.com/2008/01/16/meet-the-disintegrator-24-barrels-of-rubber-band-minigun-madnes/>
<http://www.engadget.com/2008/12/22/nerf-dart-gun-hacked-into-pulverizing-chaingun/>
<http://www.kevincyr.net/index.php?/project/camper-bike/>
More information about the omnisdev-en
mailing list