Changeset 4955


Ignore:
Timestamp:
Jun 13, 2021 9:47:36 PM (2 years ago)
Author:
toby
Message:

allow for different size fonts in CIF entry

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/GSASIIctrlGUI.py

    r4922 r4955  
    56355635            s += subs
    56365636    return s.encode('ascii','replace')
    5637        
     5637
     5638def getTextSize(txt):
     5639    'Get the size of the text string txt in points, returns (x,y)'
     5640    dc = wx.ScreenDC()
     5641    return tuple(dc.GetTextExtent(txt))
     5642   
    56385643# wx classes for reading various types of data files ######################################################################
    56395644def BlockSelector(ChoiceList, ParentFrame=None,title='Select a block',
  • trunk/exports/G2export_CIF.py

    r4909 r4955  
    30493049        self.ValidatedControlsList = []
    30503050        self.G2frame = parent.G2frame
     3051        self.height = G2G.getTextSize('?')[1]
     3052        #print('height is ',self.height)
    30513053        self._fill()
    30523054    def _fill(self):
     
    32183220        rw1 = rw.ResizeWidget(self)
    32193221        ent = G2G.ValidatedTxtCtrl(
    3220             rw1,dct,item,size=(100, 20),
     3222            rw1,dct,item,size=(100, self.height+5),
    32213223            style=wx.TE_MULTILINE|wx.TE_PROCESS_ENTER,
    32223224            CIFinput=True,ASCIIonly=True,
Note: See TracChangeset for help on using the changeset viewer.