editbox backcolor and fontcolor

Moderator: Rathinagiri

User avatar
l3whmg
Posts: 694
Joined: Mon Feb 23, 2009 8:46 pm
Location: Italy
Contact:

editbox backcolor and fontcolor

Post by l3whmg »

Hi guys,
I've found a problem using BACKCOLOR and FONTCOLOR in an EDITBOX control when it's READONLY.

Code: Select all

#include "minigui.ch"

FUNCTION main()

DEFINE WINDOW p000win ;
 ROW 0 ;
 COL 0 ;
 WIDTH 800 ;
 HEIGHT 600 ;
 TITLE 'EditBox BackColor' ;
 WINDOWTYPE MAIN ;
 FONT "Arial" ;
 SIZE 12 ;
 BACKCOLOR {153, 204, 204}

 DEFINE MAIN MENU
  DEFINE POPUP '&File'
   MENUITEM 'e&Xit' ACTION p000_exit()
  END POPUP
 END MENU

 DEFINE EDITBOX ed_ques1
  PARENT p000win
  ROW 40
  COL 20
  WIDTH 500
  HEIGHT 100
  FONTNAME "Arial"
  FONTSIZE 12
  FONTBOLD .T.
  TOOLTIP "this it's editable"
  BACKCOLOR {153, 204, 204}
  FONTCOLOR {0, 51, 204}
  TABSTOP .F.
  VALUE "this it's editable and"+hb_osnewline()+"BACKCOLOR and FONTCOLOR colors" + hb_osnewline() + "are correct"
  READONLY .F.
  VSCROLLBAR .T.
  HSCROLLBAR .T.
 END EDITBOX

 DEFINE EDITBOX ed_ques2
  PARENT p000win
  ROW 200
  COL 20
  WIDTH 500
  HEIGHT 100
  FONTNAME "Arial"
  FONTSIZE 12
  FONTBOLD .T.
  TOOLTIP "this it's NOT editable"
  BACKCOLOR {153, 204, 204}
  FONTCOLOR {0, 51, 204}
  TABSTOP .F.
  VALUE "this it's NOT editable and"+hb_osnewline()+"BACKCOLOR and FONTCOLOR colors" + hb_osnewline() + "are wrong"
  READONLY .T.
  VSCROLLBAR .T.
  HSCROLLBAR .T.
 END EDITBOX

END WINDOW
p000win.Center
p000win.Activate
RETURN NIL

/****************************************************************
* Exit function
****************************************************************/
STATIC FUNCTION p000_Exit()
ReleaseAllWindows()
RETURN NIL
I'm using Hmg 3.0.24 (2010.03.07), but it's the same in previous version

Bye.
Luigi from Italy
www.L3W.it
User avatar
mustafa
Posts: 1160
Joined: Fri Mar 20, 2009 11:38 am
DBs Used: DBF
Location: Alicante - Spain
Contact:

Re: editbox backcolor and fontcolor

Post by mustafa »

Hi Luigi
I raised this issue in another post:
http://hmgforum.com/viewtopic.php?f=24&t=951
greetings
*------------------------------------*
Hola Luigi
ya plantee este problema en otro post:
http://hmgforum.com/viewtopic.php?f=24&t=951
saludos
Mustafa
User avatar
l3whmg
Posts: 694
Joined: Mon Feb 23, 2009 8:46 pm
Location: Italy
Contact:

Re: editbox backcolor and fontcolor

Post by l3whmg »

Hi Mustafa,
thanks a lot for your "fast" replay.
I've tried the suggestion (remove "1 24 HMGRPATH...") but with this solution, I can't see buttons images that I've added in my file .rc (it's added - during compilation - to the standard minigui.rc).
It's a "little" problem; I'm developing a simple game (for childrens, which I hope to publish soon in this forum) that uses different colored forms.
Any way...
Many thanks.
Luigi from Italy
www.L3W.it
User avatar
Rathinagiri
Posts: 5471
Joined: Tue Jul 29, 2008 6:30 pm
DBs Used: MariaDB, SQLite, SQLCipher and MySQL
Location: Sivakasi, India
Contact:

Re: editbox backcolor and fontcolor

Post by Rathinagiri »

l3whmg wrote:I'm developing a simple game (for childrens, which I hope to publish soon in this forum) that uses different colored forms.
That would be great! Awaiting for the game!
East or West HMG is the Best.
South or North HMG is worth.
...the possibilities are endless.
User avatar
l3whmg
Posts: 694
Joined: Mon Feb 23, 2009 8:46 pm
Location: Italy
Contact:

Re: editbox backcolor and fontcolor

Post by l3whmg »

Hi Rathinagiri,
I hope it is interesting and ...good :oops:
I'm running the last test.
Bye
Luigi from Italy
www.L3W.it
User avatar
gfilatov
Posts: 1068
Joined: Fri Aug 01, 2008 5:42 am
Location: Ukraine
Contact:

Re: editbox backcolor and fontcolor

Post by gfilatov »

l3whmg wrote:Hi guys,
I've found a problem using BACKCOLOR and FONTCOLOR in an EDITBOX control when it's READONLY.

I'm using Hmg 3.0.24 (2010.03.07), but it's the same in previous version
Hi,

It shows the following picture at using the HMG Extended Edition:
Attachments
Colored Editbox as ReadOnly
Colored Editbox as ReadOnly
edit_pict.jpg (38.1 KiB) Viewed 5072 times
Kind Regards,
Grigory Filatov

"Everything should be made as simple as possible, but no simpler." Albert Einstein
User avatar
l3whmg
Posts: 694
Joined: Mon Feb 23, 2009 8:46 pm
Location: Italy
Contact:

Re: editbox backcolor and fontcolor

Post by l3whmg »

Hi Grigory,
I had this "suspicion" by reading the post suggested by Mustafa.
Many thanks.
Luigi from Italy
www.L3W.it
User avatar
Roberto Lopez
HMG Founder
Posts: 4004
Joined: Wed Jul 30, 2008 6:43 pm

Re: editbox backcolor and fontcolor

Post by Roberto Lopez »

gfilatov wrote:
l3whmg wrote:Hi guys,
I've found a problem using BACKCOLOR and FONTCOLOR in an EDITBOX control when it's READONLY.

I'm using Hmg 3.0.24 (2010.03.07), but it's the same in previous version
Hi,

It shows the following picture at using the HMG Extended Edition:
Dear Grigory:

Maybe the the following considerations be based on incomplete information,since that sometimes I'm absent for some days and could be missed some of your messages.

Moreover, could be possible that I've misunderstood some of your messages, since my English is not very good either.

So, there is a possibility that I'm be wrong. If this is the case, I apologize in advance.

Well...

When you arrived here, I've welcome you and I feel really good, thinking that you could help us (Indeed you've done in various occasions).

Sadly, sometimes you appear to be here with the mere intention of 'advertise' HMG Ext.

This is the HMG forum. All we are here to help ourselves on using and enhancing HMG.

So, I guess that most of the people here do not expect that the answer to a problem being an 'advertisement'.

IMHO, in this case, a positive attitude could be to propose a change to HMG code to allow a different color processing for read-only EditBox to Luigi (I'm talking about this post content, but there are various similar cases).

My words for the two HMG forks were always good. I've never was 'lurking in the shadows' of other forums waiting for an opportunity to promote HMG.

I have high hopes about that nobody do such thing.
Regards/Saludos,

Roberto


(Veritas Filia Temporis)
User avatar
Rathinagiri
Posts: 5471
Joined: Tue Jul 29, 2008 6:30 pm
DBs Used: MariaDB, SQLite, SQLCipher and MySQL
Location: Sivakasi, India
Contact:

Re: editbox backcolor and fontcolor

Post by Rathinagiri »

I do sometimes think about it.

HMG and HMG Ext. are somewhat different products now by varying compilers, approaches to system handles etc, though the basic is the same. Both of them have their own plus and minus. Now that they are different, as Roberto suggests, it would be better if we contribute to enhance/optimize HMG code here, instead of comparing these two products.

I am sure, Grigory will take this in right perspective and spirit.
East or West HMG is the Best.
South or North HMG is worth.
...the possibilities are endless.
User avatar
l3whmg
Posts: 694
Joined: Mon Feb 23, 2009 8:46 pm
Location: Italy
Contact:

Re: editbox backcolor and fontcolor

Post by l3whmg »

Hello everyone,
first of all I hope I have not created problems writing (bad English) a few posts.
In particular, in the latter, with the word "suspicion" meant that HmgEx probably had
already made an adjustment accordingly.
I participate in the forum for two reasons: to learn and deliver (from my little world) a contribution
or an idea, or (just) an alert, because I live HMG as an "end user".
It 's a long time that I follow (or try to follow) the work of Robert, since
HMG (as HmgEx) use the Borland compiler. The arguments that led to the use of the
MinGW compiler, convinced me to change (because I have a little hope: to learn Linux
and run my programs on that platform with HMG).
Sometimes I do not know where to write in this forum: If the item bugs or wishlist or
tutorials, because I think I know little HMG; although sometimes does not reach
the solution to my problem, I trust the responses of Roberto and other friends on the forum.
To date have not rejected my expectations.
Best regards.

Italian version
Salve a tutti,
prima di tutto spero di non aver creato problemi scrivendo (male in inglese) qualche post.
In particolare, in quest'ultimo, con la parola "sospetto" intendevo dire che HmgEx probabilmente
aveva già apportato un aggiustamento in tal senso.
Io partecipo al forum per due motivi: imparare e fornire (dal mio piccolo mondo) un contributo
oppure un'idea oppure (proprio) una segnalazione, perchè vivo HMG come un "utente finale".
E' da tempo che seguo (o meglio cerco di seguire) il lavoro di Roberto, sin da quando
HMG (come HmgEx) utilizzava il compilatore Borland. Le argomentazioni, che hanno portato
all'uso del compilatore MinGw, mi hanno convinto a cambiare (anche perchè ho una piccola
speranza: imparare Linux e far funzionare i miei programmi su quella piattaforma con HMG).
A volte non so bene dove scrivere in questo forum: se alla voce bugs oppure wishlist oppure
tutorials, perchè io penso di conoscere poco HMG; anche se a volte non arriva la soluzione
ad un mio problema, mi affido alle risposte di Roberto e degli altri amici di questo forum.
Sino ad oggi non hanno disatteso le mie aspettative.
Migiori saluti.
Luigi from Italy
www.L3W.it
Post Reply