Skip to content
Related Articles

Related Articles

wxPython – IsEllipsized() function in wx.StaticText

View Discussion
Improve Article
Save Article
  • Last Updated : 18 Jun, 2020
View Discussion
Improve Article
Save Article

In this article we are going to learn about IsEllipsized() function associated with wx.StaticText class of wxPython. IsEllipsized() function is used to return True if the window styles for this control contains one of the ST_ELLIPSIZE_START, ST_ELLIPSIZE_MIDDLE or ST_ELLIPSIZE_END styles.

Syntax: wx.StaticText.IsEllipsized(Self)

Parameters: No parameters required.

Return Type: bool

Code Example:

import wx
class Example(wx.Frame):
    def __init__(self, *args, **kwargs):
        super(Example, self).__init__(*args, **kwargs)
    def InitUI(self):
        self.locale = wx.Locale(wx.LANGUAGE_ENGLISH)
        self.pnl = wx.Panel(self)
        bmp = wx.Bitmap('right.png')
        # CREATE STATICTEXT AT POINT (20, 20) = wx.StaticText(self.pnl, id = 1, label ="This is the Label.",
                                pos =(20, 20), size = wx.DefaultSize, 
                                style = wx.ST_ELLIPSIZE_MIDDLE, name ="statictext")
        if( True):
            print("Not Ellipsized")
        self.SetSize((350, 250))
def main():
    app = wx.App()
    ex = Example(None)
if __name__ == '__main__':

Console Output:


Output Window:

My Personal Notes arrow_drop_up
Recommended Articles
Page :

Start Your Coding Journey Now!