Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.clipper.visual-objects > #11342

Re: COMBOBOX disabled/readonly colours...

From "Karl-Heinz" <invalid@invalid.invalid>
Newsgroups comp.lang.clipper.visual-objects
Subject Re: COMBOBOX disabled/readonly colours...
Date 2018-01-30 18:57 +0100
Message-ID <fdbq01F91qcU1@mid.individual.net> (permalink)
References <2076e234-6a2d-495c-a815-4b0f775b6e35@googlegroups.com> <p4nlnm$157t$2@gioia.aioe.org> <58b54495-eba9-4795-85c5-315bd4a69ab7@googlegroups.com> <fdb50tF47hiU1@mid.individual.net>

Show all headers | View raw


Hi Gregory

if you don´t include the manifest resource file in your app you might try
the modified Readonly assign below.The Idea behind: Because the class
prevents a focus selection as soon Readonly is set to true, it´s possible to
switch the Background and Textcolor at that moment. Sure, the button down
symbol isn´t shown in disabled mode than, but at least you´re able to change
the colors without the need to draw the complete combobox yourself.


ASSIGN ReadOnly ( lSet ) CLASS cmbDisabled

_lReadOnly := lSet

IF _lReadOnly

    SELF:Background := Brush { Color { GetSysColor ( COLOR_BTNFACE )  } }
    SELF:TextColor := Color { GetSysColor ( COLOR_BTNTEXT ) }

ELSE

    SELF:Background := Brush { Color { GetSysColor ( COLOR_WINDOW ) } }
     SELF:TextColor := Color { GetSysColor ( COLOR_BTNTEXT ) }

ENDIF


RETURN lSet


BTW: It´s a complete different story if your app is themed.


regards
Karl-Heinz 

Back to comp.lang.clipper.visual-objects | Previous | Next — Previous in thread | Find similar | Unroll thread


Thread

COMBOBOX disabled/readonly colours... "Grzegorz R." <ramotny64@gmail.com> - 2018-01-28 11:24 -0800
  Re: COMBOBOX disabled/readonly colours... Arne Ortlinghaus <Arne.Ortlinghaus@acs.it> - 2018-01-29 18:30 +0100
    Re: COMBOBOX disabled/readonly colours... "Grzegorz R." <ramotny64@gmail.com> - 2018-01-30 00:02 -0800
      Re: COMBOBOX disabled/readonly colours... "Karl-Heinz" <invalid@invalid.invalid> - 2018-01-30 12:59 +0100
        Re: COMBOBOX disabled/readonly colours... "Karl-Heinz" <invalid@invalid.invalid> - 2018-01-30 18:57 +0100

csiph-web