How to get the resize box to disappear on a Dialog when using wx.RESIZE_BORDER

The title. I’ve made a dialog box with style=wx.CAPTION | wx.RESIZE_BORDER | wx.CLOSE_BOX. It looks just how I want it, except for the following ugly resize dragger that shows up when I theme the dialog. Is there a way to remove it/theme it with the box? (Or is this a wxWidgets problem?)

In night mode:

Quantum Box

(Yes I know that the labels need fixing)

EDIT: I want this resizeable; just without the dragger that’s in the corner.

Leave out wx.RESIZE_BORDER. No other option.

See wxWidgets source code for dialog.

EDIT: (I knew that the labels needed fixing) :innocent:

And have a look at …\demo\

G’day and greetings from up above,

import wx
from wx.lib import sized_controls

class CustomDialog(sized_controls.SizedFrame):

    def __init__(self, *args, **kwargs):
        super(CustomDialog, self).__init__(*args, **kwargs)

        pane = self.GetContentsPane()

        pane.SetSizerType("grid", {"cols":3}) # 3-column grid layout

        # row 1
        stt1 = wx.StaticText(pane, wx.ID_ANY, 'File:')
        stt1.SetSizerProps(halign='right', valign='centre', border=('all', 5))

        txc1 = wx.TextCtrl(pane, wx.ID_ANY, '', size=(-1, -1))
        txc1.SetSizerProps(valign='centre', expand=True, border=('all', 5))

        btn1 = wx.Button(pane, wx.ID_ANY, label='Browse')

        # row 2
        stt2 = wx.StaticText(pane, wx.ID_ANY, 'Password:')
        stt2.SetSizerProps(halign='right', valign='centre', border=('all', 5))

        txc2 = wx.TextCtrl(pane, wx.ID_ANY, '', size=(-1, -1))
        txc2.SetSizerProps(valign='centre', expand=True, border=('all', 5))

        wx.StaticText(pane, wx.ID_ANY, '')  # dummy filler

        # row 3
        btn2 = wx.Button(pane, wx.ID_ANY, label='Encrypt')

        btn3 = wx.Button(pane, wx.ID_ANY, label='Cancel')


if __name__ == '__main__':
    app = wx.App(False)
    dlg = CustomDialog(None, title='Decrypt File (Custom Dialog)', style=wx.CAPTION | wx.RESIZE_BORDER | wx.CLOSE_BOX)
    res = dlg.Show()
1 Like

@Thom thanks! I thought there’d be some hidden trick in wx - there always is. G’day and greetings from down under :slight_smile: