On Mon, Nov 26, 2012 at 7:50 AM, Staffan Tylen <staffan.ty...@gmail.com>wrote:


> Activating one of the 4 self~create... statements in the code below shows
> a difference in the way the underlying page tab is displayed for one of
> them. For all but createStaticText the tab area outside the defined dialog
> area is shown in grey (as one would expect I guess) but for
> createStaticText the whole tab area turns white, not only the dialog area.
> Is this an expected behaviour and if so how can I make it appear like the
> other dialog controls? (I've added the BORDER option to the staticText
> control for illustration purposes.)
>

It must be something that Windows is doing, although I don't know why.
 There is nothing in ooDialog that is specifically done to cause this.

Here is your program with some extra code to "make it appear like the other
dialog controls"

page1 = .page1~new
pages = .array~of(page1)
ps = .propertySheetDialog~new(pages)
ps~execute

::class page1 subclass UserPSPDialog

::method defineDialog
  expose isStatic
  isStatic = .false

u = .DlgAreaU~new(self)
l = .DlgArea~new(u~x(''), u~y(''), u~w('30%'), u~h('100%'))

--self~createTreeView(101, l~x, l~y, l~w, l~h)
--self~createListView(101, l~x, l~y, l~w, l~h)
--self~createEdit(101, l~x, l~y, l~w, l~h)

--/*
isStatic = .true
self~createStaticText(101, l~x, l~y, l~w, l~h, "BORDER")
self~backGroundSysColor('BTNFACE')
--*/

::method initDialog
  expose isStatic

  if isStatic then do
    st = self~newStatic(101)
    st~setColor(.Image~colorRef(255, 255, 255), , .true)
  end
::requires "oodialog.cls"

The above will look as close to the same program as if the tree-view were
created.  At least to my eye.

If you take out the setColor() method for the static control, then the
background of the static control will be grayish.  The setColor() paints
the background white.  Depends on what you want.

The above is a quick fix.

I think the behavior may be coming from the fact that you never create the
dialog itself.  I.e., you have no create() method.  I was somewhat
surprised that the program works as you have written it.

However, I never use .DlgArea so there is probably some aspect of .DlgArea
that I don't understand well.

--
Mark Miesfeld
------------------------------------------------------------------------------
Monitor your physical, virtual and cloud infrastructure from a single
web console. Get in-depth insight into apps, servers, databases, vmware,
SAP, cloud infrastructure, etc. Download 30-day Free Trial.
Pricing starts from $795 for 25 servers or applications!
http://p.sf.net/sfu/zoho_dev2dev_nov
_______________________________________________
Oorexx-users mailing list
Oorexx-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/oorexx-users

Reply via email to