Coverage for src/robotide/widgets/label.py: 87%
15 statements
« prev ^ index » next coverage.py v7.8.0, created at 2025-05-06 10:40 +0100
« prev ^ index » next coverage.py v7.8.0, created at 2025-05-06 10:40 +0100
1# Copyright 2008-2015 Nokia Networks
2# Copyright 2016- Robot Framework Foundation
3#
4# Licensed under the Apache License, Version 2.0 (the "License");
5# you may not use this file except in compliance with the License.
6# You may obtain a copy of the License at
7#
8# http://www.apache.org/licenses/LICENSE-2.0
9#
10# Unless required by applicable law or agreed to in writing, software
11# distributed under the License is distributed on an "AS IS" BASIS,
12# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13# See the License for the specific language governing permissions and
14# limitations under the License.
16import wx 1ab
18from .font import Font 1ab
21class Label(wx.StaticText): 1ab
23 def __init__(self, parent, id=-1, label='', **args): 1ab
24 wx.StaticText.__init__(self, parent=parent, id=id, label=label.replace('&', '&&'), **args) 1acdefghijklmnopqr
26 def SetLabel(self, label): 1ab
27 wx.StaticText.SetLabel(self, label.replace('&', '&&')) 1s
30class HeaderLabel(Label): 1ab
32 def __init__(self, parent, label): 1ab
33 Label.__init__(self, parent, label=label)
34 self.SetFont(wx.Font(wx.FontInfo(12).Family(wx.FONTFAMILY_SWISS).Bold()))
37class HelpLabel(Label): 1ab
39 def __init__(self, parent, label): 1ab
40 Label.__init__(self, parent, label=label) 1cdefghijklmnopqr
41 self.SetFont(Font().help) 1cdefghijklmnopqr