hi i got the class of a treeCtrl and other StyledTextCtrl but in the
def event give errors saying that i can`t pass LoadFile has argument
Styled have nothing instead
i try to do it writing this
self.tree.activeitem = item
if item != self.root: #self.tree.SetItemBold(item, 1)
hi i got the class of a treeCtrl and other StyledTextCtrl but in the
def event give errors saying that i can`t pass LoadFile has argument
Styled have nothing instead
i try to do it writing this
self.tree.activeitem = item
if item != self.root: #self.tree.SetItemBold(item, 1)
styled.LoadFile(self.tree.GetItemText(item))
with that but no find the control
Because you are making a new instance of cStyledTxt, not accessing the existing one.
what i try to say is how i can pass Loadfile() to cStyled class from
the event of the tree class?
If you're in an event handler for the tree then it is likely the one with the focus, so FindFocus is giving you the tree not the STC. Instead you could save a reference to the STC someplace that you have access to later on in the tree event handler. (Such as in self, just like you have self.tree already.)