fully populating GridCellAttr()??

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

fully populating GridCellAttr()??

braidedlogix
One really important difference between 2.8 and Phoenix deals with the backend handling of GridCellAttr(). It appears that in 2.8, it is possible just to simply create the object and then override specific properties. In Phoenix, it appears that

my_attr=GridCellAttr()

creates an object with few or none of its attributes initialized.

Questions:

1. Is there some "best practice" way to fully populate the attributes?
2. Once these are created, should we do anything special during destruction?

Many Thanks, Eric

--
You received this message because you are subscribed to the Google Groups "wxPython-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: fully populating GridCellAttr()??

braidedlogix
Lesson - always remember to look at both wxPython and wxWidgets docs.

To POSSIBLY answer my own question 1:

        gr=My wx.Grid Object

        dch,dcv=gr.GetDefaultCellAlignment()
        dcbgc=gr.GetDefaultCellBackgroundColour()
        dcf=gr.GetDefaultCellFont()
        dctc=gr.GetDefaultCellTextColour()
        dce = gr.GetDefaultEditor()
        dcr = gr.GetDefaultRenderer()
        result = GridCellAttr() #new instance of GridCellAttr
        #Go through steps to decide whether or not to use default or override
        #must make sure to set these props, default or otherwise
        #renderer and editor require .IncRef(), according to my one example???

The good news for me, fully populating attributes eliminates the errors related to Null colors or Null Fonts or ...

The bad news, I am now getting an abrupt segfault, though this time it complains about refcounts - oops, different thread

--
You received this message because you are subscribed to the Google Groups "wxPython-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: fully populating GridCellAttr()??

GadgetSteve


On 14/04/2017 14:47, [hidden email] wrote:
> Lesson - always remember to look at both wxPython and wxWidgets docs.
>

I have found that the Phoenix docs are a lot better on this than the
original wxPython documents. If the is a specific area that is missing
it might be worth raising a ticket on the Phoenix documents so as to
keep track of what the problems might be.

--
Steve (Gadget) Barnes
Any opinions in this message are my personal opinions and do not reflect
those of my employer.

--
You received this message because you are subscribed to the Google Groups "wxPython-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.
Loading...