[GH-ISSUE #74] error: no member named 'SetFont' in 'MyCtrl' in GUI Tutorial Gui21 #45

Closed
opened 2026-05-05 03:35:54 -06:00 by gitea-mirror · 3 comments
Owner

Originally created by @erusyd on GitHub (May 5, 2022).
Original GitHub issue: https://github.com/ultimatepp/ultimatepp/issues/74

In GUI Tutorial Gui21, when I right click to add "User class", the default widget properties are as follows:

image

If I set "SetFont()" and "SetInk()" in Gui21.lay like this:

LAYOUT(Gui21Layout, 200, 100)
	ITEM(MyCtrl, myctrl, SetFont(StdFont(11)).SetInk(Black).LeftPosZ(44, 112).VSizePosZ(32, 32))
END_LAYOUT

It compiles with error:

error: no member named 'SetFont' in 'MyCtrl'

I have to remove "SetFont()" and "SetInk()" in Gui21.lay to get it compiled.
So what are they for of these widget properties?

Originally created by @erusyd on GitHub (May 5, 2022). Original GitHub issue: https://github.com/ultimatepp/ultimatepp/issues/74 In GUI Tutorial Gui21, when I right click to add "User class", the default **widget properties** are as follows: ![image](https://user-images.githubusercontent.com/1529102/166895724-c86e34f7-4cbd-4f73-ad65-ea2d2d2346e1.png) If I set "SetFont()" and "SetInk()" in **Gui21.lay** like this: ``` LAYOUT(Gui21Layout, 200, 100) ITEM(MyCtrl, myctrl, SetFont(StdFont(11)).SetInk(Black).LeftPosZ(44, 112).VSizePosZ(32, 32)) END_LAYOUT ``` It compiles with error: ``` error: no member named 'SetFont' in 'MyCtrl' ``` I have to remove "SetFont()" and "SetInk()" in **Gui21.lay** to get it compiled. So what are they for of these widget properties?
Author
Owner

@mirek-fidler commented on GitHub (May 7, 2022):

Well, it is sort of gray area, these are leftover from normal widgets, the idea being that either your widget knows them or you leave them unused.

Should I try to remove them?

<!-- gh-comment-id:1120156993 --> @mirek-fidler commented on GitHub (May 7, 2022): Well, it is sort of gray area, these are leftover from normal widgets, the idea being that either your widget knows them or you leave them unused. Should I try to remove them?
Author
Owner

@erusyd commented on GitHub (May 8, 2022):

OK. Maybe the gray area is not prominent. I think we can simply remove them or set them read-only if we can't use them. They are misleading as these properties are editable.

<!-- gh-comment-id:1120332565 --> @erusyd commented on GitHub (May 8, 2022): OK. Maybe the gray area is not prominent. I think we can simply remove them or set them read-only if we can't use them. They are misleading as these properties are editable.
Author
Owner

@mirek-fidler commented on GitHub (May 14, 2022):

Done.

<!-- gh-comment-id:1126656237 --> @mirek-fidler commented on GitHub (May 14, 2022): Done.
Sign in to join this conversation.
No labels
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: github-starred/ultimatepp#45
No description provided.