[wxPython] wxPython 2.3.2 problem

Okay,

here is what I found.

Under 2.3.1, I would do as such for levels:

levels go from say 0 and increment by one.

then the lev would lev | HEADERFLAG

Now I could finally get my arrow to show if I also do lev | FOLDHEADERFLAG

FOLDLEVELBASE.

Now the marks will show only for the top level folders and not the children
folders.

I also checked and it doesn't work with the demo? Do I have to set other
flags for children ???

···

-----Original Message-----
From: Neil Hodgson [mailto:nhodgson@bigpond.net.au]
Sent: December 14, 2001 5:55 PM
To: wxpython-users@lists.wxwindows.org
Subject: Re: [wxPython] wxPython 2.3.2 problem

   Hi Hassan,

Since I upgraded from 2.3.1 to 2.3.2, my custom folds have disappeared . I
am talking about wxStyledText control here.

I can still click on where the arrow should be and the folding will

happen,

but the arrows are not there. I am making these myself for Fortran.

However for all other modes they still work. Any idea?

   Scintilla can now provide a folding column that looks like a flattened
tree control using several extra images for subordinate lines and return
points. If you are setting up your own images you may have to check that you
are doing this OK. Probably best to post your STC initialisation code.

BTW:
   In the wxStyledTextCtrl_2 demo code, there is a comment:
        #self.SetFoldFlags(16) ### WHAT IS THIS VALUE? WHAT ARE THE OTHER
FLAGS? DOES IT MATTER?

   It is undocumented. Mostly they are for debugging but they also set up
the extra horizontal line that can appear above or below headers. Maybe one
day this will be cleaned up.

   Neil

_______________________________________________
wxpython-users mailing list
wxpython-users@lists.wxwindows.org
http://lists.wxwindows.org/mailman/listinfo/wxpython-users

Hassan Aurag:

here is what I found.

Under 2.3.1, I would do as such for levels:

levels go from say 0 and increment by one.

then the lev would lev | HEADERFLAG

Now I could finally get my arrow to show if I also do lev |

FOLDHEADERFLAG

> FOLDLEVELBASE.

Now the marks will show only for the top level folders and not the

children

folders.

   The basic idea is that you start lev at FOLDLEVELBASE and then increment
and decrement which allows the level to go below zero if there are more ends
than beginings.

I also checked and it doesn't work with the demo? Do I have to set other
flags for children ???

   The wxSTC_MASK_FOLDERS is set to 0xc0000000 when it should be 0xfe000000
if I have calculated it correctly. The wrapper should just use the symbol
defined in Scintilla.h to make sure it gets it right.

   So:

        self.SetMarginMask(2, 0xfe000000)

   And to get rid of the markers on subordinate lines:

        self.MarkerDefine(wxSTC_MARKNUM_FOLDERSUB, wxSTC_MARK_EMPTY, "navy",
"navy")

   Neil