Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » U++ Library support » LineEdit, EditFields, DocEdit » TextCtrl (aka LineEdit,DocEdit) dont use global Style
TextCtrl (aka LineEdit,DocEdit) dont use global Style [message #30170] Mon, 13 December 2010 11:16 Go to next message
kohait00 is currently offline  kohait00
Messages: 939
Registered: July 2009
Location: Germany
Experienced Contributor
hi all,

i found that TextCtrl and its derives LineEdit and DocEdit are handling style information in a chameleon unaware way..

it'd be great to have that fixed..
Re: TextCtrl (aka LineEdit,DocEdit) dont use global Style [message #30195 is a reply to message #30170] Tue, 14 December 2010 17:47 Go to previous messageGo to next message
kohait00 is currently offline  kohait00
Messages: 939
Registered: July 2009
Location: Germany
Experienced Contributor
i've edited the TextCtrl sources to be based on Style. maybe someone can take a look at it. mirek has to decide if this can go upstream, it makes 2 functions obsolete..

  • Attachment: TextEdit.h
    (Size: 14.85KB, Downloaded 404 times)
  • Attachment: Text.cpp
    (Size: 13.45KB, Downloaded 411 times)
  • Attachment: DocEdit.cpp
    (Size: 12.87KB, Downloaded 387 times)
  • Attachment: LineEdit.cpp
    (Size: 18.53KB, Downloaded 435 times)
Re: TextCtrl (aka LineEdit,DocEdit) dont use global Style [message #30341 is a reply to message #30195] Sat, 25 December 2010 11:14 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 13975
Registered: November 2005
Ultimate Member
kohait00 wrote on Tue, 14 December 2010 11:47

i've edited the TextCtrl sources to be based on Style. maybe someone can take a look at it. mirek has to decide if this can go upstream, it makes 2 functions obsolete..




TheIde would compile no more with this patch.

Please, think much more before breaking some interface.
Re: TextCtrl (aka LineEdit,DocEdit) dont use global Style [message #30362 is a reply to message #30341] Sun, 26 December 2010 10:38 Go to previous messageGo to next message
kohait00 is currently offline  kohait00
Messages: 939
Registered: July 2009
Location: Germany
Experienced Contributor
yes, there is one case in the highlighting as far as i know. a came across it when compiling the ide, but after having the things changed. OTOH, i dont know how i could have made the style change different in order to supprt ide compiling here. since the style *has* made some things obsolete.

IMHO, there is not a big problem in theide not compiling. ofcorse it involves changes to it, but we cant ensure that always, i try to, but some changes are 'drastical'..

the point is another..do we need/want all Ctrl's to be chameleon aware?
Re: TextCtrl (aka LineEdit,DocEdit) dont use global Style [message #30365 is a reply to message #30362] Sun, 26 December 2010 11:33 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 13975
Registered: November 2005
Ultimate Member
kohait00 wrote on Sun, 26 December 2010 04:38

yes, there is one case in the highlighting as far as i know. a came across it when compiling the ide, but after having the things changed. OTOH, i dont know how i could have made the style change different in order to supprt ide compiling here. since the style *has* made some things obsolete.

IMHO, there is not a big problem in theide not compiling. ofcorse it involves changes to it, but we cant ensure that always, i try to, but some changes are 'drastical'..

the point is another..do we need/want all Ctrl's to be chameleon aware?


Of course not.

Also, LineEdit in fact IS chameleon aware, in broader sense of meaning. Chameleon is not only about Style. LineEdit is using (as default) colors that are supplied from host platform and also host platform specific frame (ViewFrame). And all can be changed by user code for any individual widget.

We are using Style only when basic parameters are not enough.
Re: TextCtrl (aka LineEdit,DocEdit) dont use global Style [message #30369 is a reply to message #30365] Sun, 26 December 2010 12:17 Go to previous messageGo to next message
kohait00 is currently offline  kohait00
Messages: 939
Registered: July 2009
Location: Germany
Experienced Contributor
i agree with that, style is not always needed that custom. and to separate 'chamelionized' and 'styleable' is a good thing..

in case of TextCtrl:

currently, an instantiated TextCtrl is getting it's Colors in the constructor, and *after* that, there is no way to change them again. with Style this is possible. and it looks a bit weired when everything changes in colors (editing global colors) but this one doesnt.

i'll provide a testcase..
Re: TextCtrl (aka LineEdit,DocEdit) dont use global Style [message #30370 is a reply to message #30369] Sun, 26 December 2010 16:46 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 13975
Registered: November 2005
Ultimate Member
kohait00 wrote on Sun, 26 December 2010 06:17

i agree with that, style is not always needed that custom. and to separate 'chamelionized' and 'styleable' is a good thing..

in case of TextCtrl:

currently, an instantiated TextCtrl is getting it's Colors in the constructor, and *after* that, there is no way to change them again. with Style this is possible. and it looks a bit weired when everything changes in colors (editing global colors) but this one doesnt.

i'll provide a testcase..


That is known deficience in U++. You need to restart the app to match it to changed host theme. Applies to 'Styled' widgets as well.

Mirek
Re: TextCtrl (aka LineEdit,DocEdit) dont use global Style [message #32035 is a reply to message #30370] Mon, 18 April 2011 17:06 Go to previous messageGo to next message
kohait00 is currently offline  kohait00
Messages: 939
Registered: July 2009
Location: Germany
Experienced Contributor
Quote:


You need to restart the app to match it to changed host theme


not nessecarily...

in bazaar, there is a StylerTest environment, to analize this stuff. to be able to provide a 'native' upp theming, i.e. day/nightview switchable at runtime.

i think TextCtrl and ArrayCtrl (another thread) are basic enough to
have to support Style as well, because they are in the group of common Ctrl's..

as of the ide:
the change breaks only Console.cpp and CodeEditor.cpp, which can be fixed (i already did)

Re: TextCtrl (aka LineEdit,DocEdit) dont use global Style [message #32044 is a reply to message #32035] Tue, 19 April 2011 07:43 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 13975
Registered: November 2005
Ultimate Member
kohait00 wrote on Mon, 18 April 2011 11:06

i think TextCtrl and ArrayCtrl (another thread) are basic enough to
have to support Style as well, because they are in the group of common Ctrl's..



Well, you you would be able to style is default font (for editors) and default colors.

You can change both now via attributes and colors are basic SColors.
Re: TextCtrl (aka LineEdit,DocEdit) dont use global Style [message #32049 is a reply to message #32044] Tue, 19 April 2011 10:28 Go to previous messageGo to next message
kohait00 is currently offline  kohait00
Messages: 939
Registered: July 2009
Location: Germany
Experienced Contributor
yes i know that the stuff is manipulatable as well. but...

it's got to do with code consistency..user comes the way to use an arbitrary Ctrl and knows, 'i want to customize appearance -> i look for the Style', instead of skimming the code to find appropriate methods.

upp code is very user friendly, but there are still things that can be 'standardized' to be more predictable. which is a feature of good design concepts as well.

like i said, i dont want upp to go 'my way'. i simply emphasize what could be changed to improve user experience. (of corse i came across this issues while coding my self, so it's my user experience).
Re: TextCtrl (aka LineEdit,DocEdit) dont use global Style [message #32060 is a reply to message #32049] Tue, 19 April 2011 19:06 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 13975
Registered: November 2005
Ultimate Member
kohait00 wrote on Tue, 19 April 2011 04:28

yes i know that the stuff is manipulatable as well. but...

it's got to do with code consistency..user comes the way to use an arbitrary Ctrl and knows, 'i want to customize appearance -> i look for the Style', instead of skimming the code to find appropriate methods.

upp code is very user friendly, but there are still things that can be 'standardized' to be more predictable. which is a feature of good design concepts as well.

like i said, i dont want upp to go 'my way'. i simply emphasize what could be changed to improve user experience. (of corse i came across this issues while coding my self, so it's my user experience).



Well, my take on chameleon is that widgets should derive as much of their appearance from existing information in the system. Only if this is not possible, it is time to use Style.

I believe that ArrayCtrl or LineEdit are examples of widgets where the full information about appearance can be derived from such public information.

(But keep poking me, I still might reconsider this - but breaking existing code is a big no-no here...)
Re: TextCtrl (aka LineEdit,DocEdit) dont use global Style [message #32064 is a reply to message #32060] Tue, 19 April 2011 20:22 Go to previous messageGo to next message
kohait00 is currently offline  kohait00
Messages: 939
Registered: July 2009
Location: Germany
Experienced Contributor
Quote:


breaking existing code is a big no-no here


fully understand you..
maybe there can be a way to leave the methods and have a
One<Style> which is then set up correctly and registered as Style. user wouldn't notice any difference. but maybe theres better ways.

just to emphasize another point about attractivenesses of upp and its Ctrl's:

they not only can look like native controls, if one as coder whishes so, but they can also be customized to a maximum degree to make totally *OS-unrelated* GUI's, to reflect some personal style, if desired. depending how much effort one is willing to spend.
thats another *big* advantage of upp to keep in mind and is actually what keeps me using upp (besides the Core goodies).
i'm programming gui's for enterprises, that clearly want to set their visual style apart from the 'common' and 'boring' OS gui experience. here, the customization is lovely welcome and i dont need to recode the wheel again just to fit the appearance.

but, again, thank you veeery much for your patience with me.



[Updated on: Tue, 19 April 2011 20:25]

Report message to a moderator

Re: TextCtrl (aka LineEdit,DocEdit) dont use global Style [message #32205 is a reply to message #32064] Sat, 30 April 2011 19:12 Go to previous message
mirek is currently offline  mirek
Messages: 13975
Registered: November 2005
Ultimate Member
kohait00 wrote on Tue, 19 April 2011 14:22

Quote:


breaking existing code is a big no-no here


fully understand you..
maybe there can be a way to leave the methods and have a
One<Style> which is then set up correctly and registered as Style. user wouldn't notice any difference. but maybe theres better ways.

just to emphasize another point about attractivenesses of upp and its Ctrl's:

they not only can look like native controls, if one as coder whishes so, but they can also be customized to a maximum degree to make totally *OS-unrelated* GUI's, to reflect some personal style, if desired. depending how much effort one is willing to spend.
thats another *big* advantage of upp to keep in mind and is actually what keeps me using upp (besides the Core goodies).
i'm programming gui's for enterprises, that clearly want to set their visual style apart from the 'common' and 'boring' OS gui experience.



Definitely:

http://www.ederedv.at/solutions/gks.html

Anyway, if it was possible to do that with U++ 4 years ago, I guess Chameleon is not missing much...
Previous Topic: [FEATURE] WhenLostFocus in EditField
Next Topic: Masking the password field in the login page
Goto Forum:
  


Current Time: Thu Mar 28 17:55:20 CET 2024

Total time taken to generate the page: 0.01693 seconds