Page 1 of 1

End-user can customize the color!

Posted: Wed Jul 28, 2010 12:38 pm
by sudip
Hi All,

This is a very basic, easy and funny app!!! ;)

Using this your users can customize the color of their apps.

Please download from:
ColorChange.zip
(1.6 KiB) Downloaded 472 times
Please compile and run. Please note that user can get the full effect after saving and restarting the app! ;)

Please send your feedback. It's important for my learning :)

Re: End-user can customize the color!

Posted: Wed Jul 28, 2010 12:47 pm
by esgici
Thanks to sharing Sudip :)

After analyzing I'll opine.

Regards

--

Esgici

Re: End-user can customize the color!

Posted: Wed Jul 28, 2010 1:00 pm
by esgici
Analysed; very nice, thanks again Sudip :)

Exactly what I like : SSE ( Short, Simple and Effective ) :D

The way of read/save color values is also good :)

By the way, you thing use it how; a single color scheme for all form and controls of your application, accept user color preference for each form and/or control separately ?

Regards

--

Esgici

Re: End-user can customize the color!

Posted: Wed Jul 28, 2010 1:35 pm
by sudip
esgici wrote:...
By the way, you thing use it how; a single color scheme for all form and controls of your application, accept user color preference for each form and/or control separately ?
...
Hi Esgici,

Thanks a lot for your kind words :)

I created this app suddenly, when the idea came to my mind (and HMG is a very good tool to make our ideas true :D). I didn't think it seriously yet, but some ideas again :idea:
1. Form and control back color may be stored separately - it can be done using ini file.
2. I like same look and feel through out an app, but my users most probably don't like it. If they want to maintain different color schemes for different form, it can be stored in local tables. I don't want to give much pressure on ini file.

This is my ad-hoc view of the solution of the problem. Please tell us what's your solution :)

Thank you again for taking this basic and small app seriously :)

After some time:
I changed some code for GetBackcolor() and GetForecolor() functions as follows:

Code: Select all

//---------------------------- getbackcolor()
function getbackcolor()
   local acol := getcolor({bcr, bcg, bcb})
   if !(valtype(acol) == 'A' .and. len(acol) == 3 .and. valtype(acol[1]) == 'N')
      return nil
   endif
   bcr := acol[1]
   bcg := acol[2]
   bcb := acol[3]
   changecolor()
   return nil


//---------------------------- getforecolor()
function getforecolor()
   local acol := getcolor({fcr, fcg, fcb})
   if !(valtype(acol) == 'A' .and. len(acol) == 3 .and. valtype(acol[1]) == 'N')
      return nil
   endif
   fcr := acol[1]
   fcg := acol[2]
   fcb := acol[3]
   changecolor()
   return nil

Re: End-user can customize the color!

Posted: Thu Jul 29, 2010 5:47 am
by swapan
Sudip thanks for sharing, will go through it.

About Color customization..............

Well, initially I too wished for giving options to users on this, so that they can change the screen colors as per to their preference. I still remember my initial days of programming - heavy use of "blinking" and multi-colors. But now prefer to keep it simple or refrain from using multi-colors.

Now I think its better to keep this option confined to developers only.
Yes our programming design should be dynamic so that we can handle color & font management system globally by changing just at one place it gets reflected on the entire application, using global variables (with/without values stored in a table for this) for forms background, foreground, fonts size etc.

See, I think my application should have the universal look & feel - esp. for offices, corporate setups, it gives a "smarter" look to your application. Otherwise users can unnecessary "play" with the color options and the serious look of an application fades with such experiments.

And it also depends upon the kind of application, if its for serious office work I would like to keep the color customization confined to developer but if its some kind of tool or meant for fun - then we may allow end-user customization.

This was just my 2 cents.

Re: End-user can customize the color!

Posted: Thu Jul 29, 2010 7:04 am
by swapan
sudip wrote:Hi All,

This is a very basic, easy and funny app!!! ;)

Using this your users can customize the color of their apps.

Please download from:
ColorChange.zip
Please compile and run. Please note that user can get the full effect after saving and restarting the app! ;)

Please send your feedback. It's important for my learning :)
Just checked......nice work. We the developers too can incorporate this idea and expand this module into our applications for managing the cosmetic beauty of our software dynamically.This idea goes well with my previous post also, as programmer we can integrate such a module in our application for our own use. As later on if we need to change color (fonts option can be added to it - I suppose) of our application's screens, we can use this module.

So not only the end-user, developer can use it too. Good implementation Sudip.......can be expanded to more details from here. THANKS FOR SHARING.........

Re: End-user can customize the color!

Posted: Thu Jul 29, 2010 11:51 am
by PeteWG
sudip wrote:This is a very basic, easy and funny app!!! ;)
Colors are very important elements for any contemporary GUI. So, this relaxingly simple program could be of much interest if it re-worked to become a quite generic code, so as to be able to incorporated into real-world applications. Indeed, a colorful inspiration you have had Sudip! ;-)
sudip wrote:Please note that user can get the full effect after saving and restarting the app! ;)
Ah! The well-known and equally infamous "reboot syndrome", invented by our dear MS: "You need to restart your computer..."
But no! in minigui appls we have no such need, because minigui has been designed "to make things simple"..
Sudip, below is a slightly modified version of your excellent sample, allowing color changes to take effect without the need of a restart.
ChColors.zip
(1.33 KiB) Downloaded 397 times
Unfortunately this does not work on HMG (works only on minigui ext.) due to 'backcolor' property is availble only during definition of window. I am sure that Roberto could easily improve this, in a future release.

regards,

---
Pete

Re: End-user can customize the color!

Posted: Thu Jul 29, 2010 12:36 pm
by sudip
Thank you Pete, for your kind words :)

You are correct. I couldn't use on the fly color change for opened windows, as windows 'backcolor' property is available during definition only. But, I believe there is a trick to use it with HMG :) (eg., as I leared from our friends - how to make a grid read only on the fly with HMG ... ;) )

So I shall wait. :)

I downloaded your Minigui Ext version of the app. Great :)
We can also easily change all the opened windows backcolor using your method.