1
1
Fork 0
mirror of https://github.com/FellippeHeitor/InForm.git synced 2025-01-15 11:59:34 +00:00

SetCaption now takes an ID instead of a control name.

This commit is contained in:
FellippeHeitor 2016-12-22 09:46:51 -02:00
parent 3312afde74
commit dafa3e8e10
6 changed files with 118 additions and 360 deletions

View file

@ -290,46 +290,46 @@ SUB __UI_InternalMenus
Control(__UI_NewID).Font = SetFont("segoeui.ttf",12,"") Control(__UI_NewID).Font = SetFont("segoeui.ttf",12,"")
__UI_NewID = __UI_NewControl(__UI_Type_MenuItem, "__UI_PreviewMenuAlignLeft", 0, 0, 0, 0, __UI_GetID("__UI_PreviewMenu")) __UI_NewID = __UI_NewControl(__UI_Type_MenuItem, "__UI_PreviewMenuAlignLeft", 0, 0, 0, 0, __UI_GetID("__UI_PreviewMenu"))
SetCaption "__UI_PreviewMenuAlignLeft", "Align &Left" SetCaption __UI_GetID("__UI_PreviewMenuAlignLeft"), "Align &Left"
__UI_NewID = __UI_NewControl(__UI_Type_MenuItem, "__UI_PreviewMenuAlignRight", 0, 0, 0, 0, __UI_GetID("__UI_PreviewMenu")) __UI_NewID = __UI_NewControl(__UI_Type_MenuItem, "__UI_PreviewMenuAlignRight", 0, 0, 0, 0, __UI_GetID("__UI_PreviewMenu"))
SetCaption "__UI_PreviewMenuAlignRight", "Align &Right" SetCaption __UI_GetID("__UI_PreviewMenuAlignRight"), "Align &Right"
__UI_NewID = __UI_NewControl(__UI_Type_MenuItem, "__UI_PreviewMenuAlignTops", 0, 0, 0, 0, __UI_GetID("__UI_PreviewMenu")) __UI_NewID = __UI_NewControl(__UI_Type_MenuItem, "__UI_PreviewMenuAlignTops", 0, 0, 0, 0, __UI_GetID("__UI_PreviewMenu"))
SetCaption "__UI_PreviewMenuAlignTops", "Align T&op" SetCaption __UI_GetID("__UI_PreviewMenuAlignTops"), "Align T&op"
__UI_NewID = __UI_NewControl(__UI_Type_MenuItem, "__UI_PreviewMenuAlignBottoms", 0, 0, 0, 0, __UI_GetID("__UI_PreviewMenu")) __UI_NewID = __UI_NewControl(__UI_Type_MenuItem, "__UI_PreviewMenuAlignBottoms", 0, 0, 0, 0, __UI_GetID("__UI_PreviewMenu"))
SetCaption "__UI_PreviewMenuAlignBottoms", "Align &Bottom-" SetCaption __UI_GetID("__UI_PreviewMenuAlignBottoms"), "Align &Bottom-"
__UI_NewID = __UI_NewControl(__UI_Type_MenuItem, "__UI_PreviewMenuAlignCentersV", 0, 0, 0, 0, __UI_GetID("__UI_PreviewMenu")) __UI_NewID = __UI_NewControl(__UI_Type_MenuItem, "__UI_PreviewMenuAlignCentersV", 0, 0, 0, 0, __UI_GetID("__UI_PreviewMenu"))
SetCaption "__UI_PreviewMenuAlignCentersV", "Align cent&ers Vertically" SetCaption __UI_GetID("__UI_PreviewMenuAlignCentersV"), "Align cent&ers Vertically"
__UI_NewID = __UI_NewControl(__UI_Type_MenuItem, "__UI_PreviewMenuAlignCentersH", 0, 0, 0, 0, __UI_GetID("__UI_PreviewMenu")) __UI_NewID = __UI_NewControl(__UI_Type_MenuItem, "__UI_PreviewMenuAlignCentersH", 0, 0, 0, 0, __UI_GetID("__UI_PreviewMenu"))
SetCaption "__UI_PreviewMenuAlignCentersH", "Ali&gn centers Horizontally" SetCaption __UI_GetID("__UI_PreviewMenuAlignCentersH"), "Ali&gn centers Horizontally"
__UI_NewID = __UI_NewControl(__UI_Type_MenuItem, "__UI_PreviewMenuAlignCenterV", 0, 0, 0, 0, __UI_GetID("__UI_PreviewMenu")) __UI_NewID = __UI_NewControl(__UI_Type_MenuItem, "__UI_PreviewMenuAlignCenterV", 0, 0, 0, 0, __UI_GetID("__UI_PreviewMenu"))
SetCaption "__UI_PreviewMenuAlignCenterV", "Center &Vertically" SetCaption __UI_GetID("__UI_PreviewMenuAlignCenterV"), "Center &Vertically"
__UI_NewID = __UI_NewControl(__UI_Type_MenuItem, "__UI_PreviewMenuAlignCenterH", 0, 0, 0, 0, __UI_GetID("__UI_PreviewMenu")) __UI_NewID = __UI_NewControl(__UI_Type_MenuItem, "__UI_PreviewMenuAlignCenterH", 0, 0, 0, 0, __UI_GetID("__UI_PreviewMenu"))
SetCaption "__UI_PreviewMenuAlignCenterH", "Center &Horizontally-" SetCaption __UI_GetID("__UI_PreviewMenuAlignCenterH"), "Center &Horizontally-"
__UI_NewID = __UI_NewControl(__UI_Type_MenuItem, "__UI_PreviewMenuDistributeV", 0, 0, 0, 0, __UI_GetID("__UI_PreviewMenu")) __UI_NewID = __UI_NewControl(__UI_Type_MenuItem, "__UI_PreviewMenuDistributeV", 0, 0, 0, 0, __UI_GetID("__UI_PreviewMenu"))
SetCaption "__UI_PreviewMenuDistributeV", "Distribute Ver&tically" SetCaption __UI_GetID("__UI_PreviewMenuDistributeV"), "Distribute Ver&tically"
__UI_NewID = __UI_NewControl(__UI_Type_MenuItem, "__UI_PreviewMenuDistributeH", 0, 0, 0, 0, __UI_GetID("__UI_PreviewMenu")) __UI_NewID = __UI_NewControl(__UI_Type_MenuItem, "__UI_PreviewMenuDistributeH", 0, 0, 0, 0, __UI_GetID("__UI_PreviewMenu"))
SetCaption "__UI_PreviewMenuDistributeH", "Distribute Hori&zontally-" SetCaption __UI_GetID("__UI_PreviewMenuDistributeH"), "Distribute Hori&zontally-"
__UI_NewID = __UI_NewControl(__UI_Type_MenuItem, "__UI_PreviewMenuCopy", 0, 0, 0, 0, __UI_GetID("__UI_PreviewMenu")) __UI_NewID = __UI_NewControl(__UI_Type_MenuItem, "__UI_PreviewMenuCopy", 0, 0, 0, 0, __UI_GetID("__UI_PreviewMenu"))
SetCaption "__UI_PreviewMenuCopy", "&Copy" SetCaption __UI_GetID("__UI_PreviewMenuCopy"), "&Copy"
__UI_NewID = __UI_NewControl(__UI_Type_MenuItem, "__UI_PreviewMenuPaste", 0, 0, 0, 0, __UI_GetID("__UI_PreviewMenu")) __UI_NewID = __UI_NewControl(__UI_Type_MenuItem, "__UI_PreviewMenuPaste", 0, 0, 0, 0, __UI_GetID("__UI_PreviewMenu"))
SetCaption "__UI_PreviewMenuPaste", "&Paste" SetCaption __UI_GetID("__UI_PreviewMenuPaste"), "&Paste"
__UI_NewID = __UI_NewControl(__UI_Type_MenuItem, "__UI_PreviewMenuDelete", 0, 0, 0, 0, __UI_GetID("__UI_PreviewMenu")) __UI_NewID = __UI_NewControl(__UI_Type_MenuItem, "__UI_PreviewMenuDelete", 0, 0, 0, 0, __UI_GetID("__UI_PreviewMenu"))
SetCaption "__UI_PreviewMenuDelete", "&Delete-" SetCaption __UI_GetID("__UI_PreviewMenuDelete"), "&Delete-"
__UI_NewID = __UI_NewControl(__UI_Type_MenuItem, "__UI_PreviewMenuSelect", 0, 0, 0, 0, __UI_GetID("__UI_PreviewMenu")) __UI_NewID = __UI_NewControl(__UI_Type_MenuItem, "__UI_PreviewMenuSelect", 0, 0, 0, 0, __UI_GetID("__UI_PreviewMenu"))
SetCaption "__UI_PreviewMenuSelect", "Select &All" SetCaption __UI_GetID("__UI_PreviewMenuSelect"), "Select &All"
END SUB END SUB
'--------------------------------------------------------------------------------- '---------------------------------------------------------------------------------
@ -364,19 +364,19 @@ SUB __UI_Init
NEXT NEXT
__UI_NewID = __UI_NewControl(__UI_Type_MenuItem, "__UI_TextMenuCut", 0, 0, 0, 0, __UI_GetID("__UI_TextFieldMenu")) __UI_NewID = __UI_NewControl(__UI_Type_MenuItem, "__UI_TextMenuCut", 0, 0, 0, 0, __UI_GetID("__UI_TextFieldMenu"))
SetCaption "__UI_TextMenuCut", "Cu&t" SetCaption __UI_GetID("__UI_TextMenuCut"), "Cu&t"
__UI_NewID = __UI_NewControl(__UI_Type_MenuItem, "__UI_TextMenuCopy", 0, 0, 0, 0, __UI_GetID("__UI_TextFieldMenu")) __UI_NewID = __UI_NewControl(__UI_Type_MenuItem, "__UI_TextMenuCopy", 0, 0, 0, 0, __UI_GetID("__UI_TextFieldMenu"))
SetCaption "__UI_TextMenuCopy", "&Copy" SetCaption __UI_GetID("__UI_TextMenuCopy"), "&Copy"
__UI_NewID = __UI_NewControl(__UI_Type_MenuItem, "__UI_TextMenuPaste", 0, 0, 0, 0, __UI_GetID("__UI_TextFieldMenu")) __UI_NewID = __UI_NewControl(__UI_Type_MenuItem, "__UI_TextMenuPaste", 0, 0, 0, 0, __UI_GetID("__UI_TextFieldMenu"))
SetCaption "__UI_TextMenuPaste", "&Paste" SetCaption __UI_GetID("__UI_TextMenuPaste"), "&Paste"
__UI_NewID = __UI_NewControl(__UI_Type_MenuItem, "__UI_TextMenuDelete", 0, 0, 0, 0, __UI_GetID("__UI_TextFieldMenu")) __UI_NewID = __UI_NewControl(__UI_Type_MenuItem, "__UI_TextMenuDelete", 0, 0, 0, 0, __UI_GetID("__UI_TextFieldMenu"))
SetCaption "__UI_TextMenuDelete", "&Delete-" SetCaption __UI_GetID("__UI_TextMenuDelete"), "&Delete-"
__UI_NewID = __UI_NewControl(__UI_Type_MenuItem, "__UI_TextMenuSelect", 0, 0, 0, 0, __UI_GetID("__UI_TextFieldMenu")) __UI_NewID = __UI_NewControl(__UI_Type_MenuItem, "__UI_TextMenuSelect", 0, 0, 0, 0, __UI_GetID("__UI_TextFieldMenu"))
SetCaption "__UI_TextMenuSelect", "Select &all" SetCaption __UI_GetID("__UI_TextMenuSelect"), "Select &all"
END IF END IF
_DISPLAYORDER _SOFTWARE, _HARDWARE _DISPLAYORDER _SOFTWARE, _HARDWARE
@ -1486,7 +1486,7 @@ SUB __UI_EventDispatcher
IF Control(__UI_HoveringID).Type = __UI_Type_MenuPanel AND LEFT$(Control(__UI_ParentMenu).Name, 5) <> "__UI_" THEN IF Control(__UI_HoveringID).Type = __UI_Type_MenuPanel AND LEFT$(Control(__UI_ParentMenu).Name, 5) <> "__UI_" THEN
DIM TempValue AS LONG DIM TempValue AS LONG
TempValue = __UI_NewControl(__UI_Type_MenuItem, "", 0, 0, 0, 0, __UI_ParentMenu) TempValue = __UI_NewControl(__UI_Type_MenuItem, "", 0, 0, 0, 0, __UI_ParentMenu)
SetCaption Control(TempValue).Name, RTRIM$(Control(TempValue).Name) SetCaption TempValue, RTRIM$(Control(TempValue).Name)
__UI_ActivateMenu Control(__UI_ParentMenu), False __UI_ActivateMenu Control(__UI_ParentMenu), False
FOR i = 1 TO UBOUND(Control) FOR i = 1 TO UBOUND(Control)
Control(i).ControlIsSelected = False Control(i).ControlIsSelected = False
@ -1497,7 +1497,7 @@ SUB __UI_EventDispatcher
ELSEIF Control(__UI_HoveringID).Type = __UI_Type_Form AND __UI_MouseTop <= (uspacing& + 5) THEN ELSEIF Control(__UI_HoveringID).Type = __UI_Type_Form AND __UI_MouseTop <= (uspacing& + 5) THEN
IF __UI_HasMenuBar THEN IF __UI_HasMenuBar THEN
TempValue = __UI_NewControl(__UI_Type_MenuBar, "", 0, 0, 0, 0, 0) TempValue = __UI_NewControl(__UI_Type_MenuBar, "", 0, 0, 0, 0, 0)
SetCaption Control(TempValue).Name, RTRIM$(Control(TempValue).Name) SetCaption TempValue, RTRIM$(Control(TempValue).Name)
FOR i = 1 TO UBOUND(Control) FOR i = 1 TO UBOUND(Control)
Control(i).ControlIsSelected = False Control(i).ControlIsSelected = False
NEXT NEXT
@ -3803,15 +3803,15 @@ SUB __UI_DestroyControl (This AS __UI_ControlTYPE)
END SUB END SUB
'--------------------------------------------------------------------------------- '---------------------------------------------------------------------------------
SUB SetCaption (Control$, TempCaption$) SUB SetCaption (ThisID AS LONG, TempCaption$)
DIM i AS LONG, FindSep%, ThisID AS LONG, NewCaption$, UsedList$, TempKey AS _UNSIGNED _BYTE DIM i AS LONG, FindSep%, NewCaption$, UsedList$, TempKey AS _UNSIGNED _BYTE
DIM PrevFont AS LONG, TempCanvas AS LONG, PrevDest AS LONG DIM PrevFont AS LONG, TempCanvas AS LONG, PrevDest AS LONG
ThisID = __UI_GetID(Control$)
IF ThisID = 0 THEN EXIT SUB IF ThisID = 0 THEN EXIT SUB
NewCaption$ = TempCaption$ NewCaption$ = TempCaption$
'Parse for hotkey markers
FindSep% = INSTR(NewCaption$, "&") FindSep% = INSTR(NewCaption$, "&")
IF FindSep% > 0 AND FindSep% < LEN(NewCaption$) THEN IF FindSep% > 0 AND FindSep% < LEN(NewCaption$) THEN
FOR i = 1 TO UBOUND(Control) FOR i = 1 TO UBOUND(Control)
@ -3852,6 +3852,9 @@ SUB SetCaption (Control$, TempCaption$)
Control(ThisID).HotKey = 0 Control(ThisID).HotKey = 0
END IF END IF
'Replace \n for line breaks:
NewCaption$ = Replace$(NewCaption$, "\n", CHR$(10), False, 0)
Caption(ThisID) = NewCaption$ Caption(ThisID) = NewCaption$
END SUB END SUB

View file

@ -546,7 +546,7 @@ SUB __UI_BeforeUpdateDisplay
IF LEN(RTRIM$(__UI_TrimAt0$(PreviewControls(PreviewFormID).Name))) > 0 THEN IF LEN(RTRIM$(__UI_TrimAt0$(PreviewControls(PreviewFormID).Name))) > 0 THEN
Caption(__UI_FormID) = UiEditorTitle$ + " - " + RTRIM$(PreviewControls(PreviewFormID).Name) + ".frmbin" Caption(__UI_FormID) = UiEditorTitle$ + " - " + RTRIM$(PreviewControls(PreviewFormID).Name) + ".frmbin"
SetCaption "FileMenuSave", "&Save '" + RTRIM$(PreviewControls(PreviewFormID).Name) + ".frmbin'-" SetCaption __UI_GetID("FileMenuSave"), "&Save '" + RTRIM$(PreviewControls(PreviewFormID).Name) + ".frmbin'-"
END IF END IF
IF Edited THEN IF Edited THEN
@ -597,7 +597,7 @@ SUB __UI_BeforeUpdateDisplay
END IF END IF
IF TotalSelected = 0 THEN IF TotalSelected = 0 THEN
SetCaption "PropertiesFrame", "Control properties: " + RTRIM$(PreviewControls(PreviewFormID).Name) SetCaption __UI_GetID("PropertiesFrame"), "Control properties: " + RTRIM$(PreviewControls(PreviewFormID).Name)
FirstSelected = PreviewFormID FirstSelected = PreviewFormID
Control(__UI_GetID("AlignMenuAlignLeft")).Disabled = True Control(__UI_GetID("AlignMenuAlignLeft")).Disabled = True
@ -613,7 +613,7 @@ SUB __UI_BeforeUpdateDisplay
ELSEIF TotalSelected = 1 THEN ELSEIF TotalSelected = 1 THEN
IF FirstSelected > 0 AND FirstSelected <= UBOUND(PreviewControls) THEN IF FirstSelected > 0 AND FirstSelected <= UBOUND(PreviewControls) THEN
SetCaption "PropertiesFrame", "Control properties: " + RTRIM$(PreviewControls(FirstSelected).Name) SetCaption __UI_GetID("PropertiesFrame"), "Control properties: " + RTRIM$(PreviewControls(FirstSelected).Name)
Control(__UI_GetID("AlignMenuAlignLeft")).Disabled = True Control(__UI_GetID("AlignMenuAlignLeft")).Disabled = True
Control(__UI_GetID("AlignMenuAlignRight")).Disabled = True Control(__UI_GetID("AlignMenuAlignRight")).Disabled = True
@ -634,7 +634,7 @@ SUB __UI_BeforeUpdateDisplay
END IF END IF
ELSEIF TotalSelected = 2 THEN ELSEIF TotalSelected = 2 THEN
SetCaption "PropertiesFrame", "Control properties: (multiple selection)" SetCaption __UI_GetID("PropertiesFrame"), "Control properties: (multiple selection)"
Control(__UI_GetID("AlignMenuAlignLeft")).Disabled = False Control(__UI_GetID("AlignMenuAlignLeft")).Disabled = False
Control(__UI_GetID("AlignMenuAlignRight")).Disabled = False Control(__UI_GetID("AlignMenuAlignRight")).Disabled = False
@ -648,7 +648,7 @@ SUB __UI_BeforeUpdateDisplay
Control(__UI_GetID("AlignMenuDistributeH")).Disabled = True Control(__UI_GetID("AlignMenuDistributeH")).Disabled = True
ELSE ELSE
SetCaption "PropertiesFrame", "Control properties: (multiple selection)" SetCaption __UI_GetID("PropertiesFrame"), "Control properties: (multiple selection)"
Control(__UI_GetID("AlignMenuAlignLeft")).Disabled = False Control(__UI_GetID("AlignMenuAlignLeft")).Disabled = False
Control(__UI_GetID("AlignMenuAlignRight")).Disabled = False Control(__UI_GetID("AlignMenuAlignRight")).Disabled = False
@ -5401,7 +5401,7 @@ SUB SaveForm (ExitToQB64 AS _BYTE)
'ELSE 'ELSE
' a$ = PreviewCaptions(i) ' a$ = PreviewCaptions(i)
'END IF 'END IF
a$ = " SetCaption " + CHR$(34) + RTRIM$(PreviewControls(i).Name) + CHR$(34) + ", " + __UI_SpecialCharsToCHR$(PreviewCaptions(i)) a$ = " SetCaption __UI_NewID, " + __UI_SpecialCharsToCHR$(PreviewCaptions(i))
b$ = MKI$(-2) + MKL$(LEN(PreviewCaptions(i))) '-2 indicates a caption b$ = MKI$(-2) + MKL$(LEN(PreviewCaptions(i))) '-2 indicates a caption
PUT #BinaryFileNum, , b$ PUT #BinaryFileNum, , b$
PUT #BinaryFileNum, , PreviewCaptions(i) PUT #BinaryFileNum, , PreviewCaptions(i)
@ -5409,7 +5409,7 @@ SUB SaveForm (ExitToQB64 AS _BYTE)
END IF END IF
IF LEN(PreviewTips(i)) > 0 THEN IF LEN(PreviewTips(i)) > 0 THEN
a$ = " ToolTip(__UI_GetID(" + CHR$(34) + RTRIM$(PreviewControls(i).Name) + CHR$(34) + ")) = " + __UI_SpecialCharsToCHR$(PreviewTips(i)) a$ = " ToolTip(__UI_NewID) = " + __UI_SpecialCharsToCHR$(PreviewTips(i))
b$ = MKI$(-24) + MKL$(LEN(PreviewTips(i))) '-24 indicates a tip b$ = MKI$(-24) + MKL$(LEN(PreviewTips(i))) '-24 indicates a tip
PUT #BinaryFileNum, , b$ PUT #BinaryFileNum, , b$
PUT #BinaryFileNum, , PreviewTips(i) PUT #BinaryFileNum, , PreviewTips(i)
@ -5441,7 +5441,7 @@ SUB SaveForm (ExitToQB64 AS _BYTE)
a$ = " LoadImage Control(__UI_NewID), " + CHR$(34) + PreviewTexts(i) + CHR$(34) a$ = " LoadImage Control(__UI_NewID), " + CHR$(34) + PreviewTexts(i) + CHR$(34)
PRINT #TextFileNum, a$ PRINT #TextFileNum, a$
CASE ELSE CASE ELSE
a$ = " Text(__UI_GetID(" + CHR$(34) + RTRIM$(PreviewControls(i).Name) + CHR$(34) + ")) = " + __UI_SpecialCharsToCHR$(PreviewTexts(i)) a$ = " Text(__UI_NewID) = " + __UI_SpecialCharsToCHR$(PreviewTexts(i))
PRINT #TextFileNum, a$ PRINT #TextFileNum, a$
END SELECT END SELECT
b$ = MKI$(-3) + MKL$(LEN(PreviewTexts(i))) '-3 indicates a text b$ = MKI$(-3) + MKL$(LEN(PreviewTexts(i))) '-3 indicates a text
@ -5709,250 +5709,6 @@ SUB SaveForm (ExitToQB64 AS _BYTE)
END IF END IF
END SUB END SUB
SUB SaveSelf
DIM b$, i AS LONG, a$, FontSetup$
OPEN "form.frm" FOR OUTPUT AS #1
IF _FILEEXISTS("form.frmbin") THEN KILL "form.frmbin"
OPEN "form.frmbin" FOR BINARY AS #2
PRINT #1, "'UI form, beta version"
PRINT #1, "DIM __UI_NewID AS LONG"
PRINT #1,
b$ = "UI"
PUT #2, 1, b$
b$ = MKL$(UBOUND(Control))
PUT #2, , b$
FOR i = 1 TO UBOUND(Control)
IF Control(i).ID > 0 AND Control(i).Type <> __UI_Type_MenuPanel AND Control(i).Type <> __UI_Type_Font AND LEN(RTRIM$(Control(i).Name)) > 0 THEN
a$ = "__UI_NewID = __UI_NewControl("
SELECT CASE Control(i).Type
CASE __UI_Type_Form: a$ = a$ + "__UI_Type_Form, "
CASE __UI_Type_Frame: a$ = a$ + "__UI_Type_Frame, "
CASE __UI_Type_Button: a$ = a$ + "__UI_Type_Button, "
CASE __UI_Type_Label: a$ = a$ + "__UI_Type_Label, "
CASE __UI_Type_CheckBox: a$ = a$ + "__UI_Type_CheckBox, "
CASE __UI_Type_RadioButton: a$ = a$ + "__UI_Type_RadioButton, "
CASE __UI_Type_TextBox: a$ = a$ + "__UI_Type_TextBox, "
CASE __UI_Type_ProgressBar: a$ = a$ + "__UI_Type_ProgressBar, "
CASE __UI_Type_ListBox: a$ = a$ + "__UI_Type_ListBox, "
CASE __UI_Type_DropdownList: a$ = a$ + "__UI_Type_DropdownList, "
CASE __UI_Type_MenuBar: a$ = a$ + "__UI_Type_MenuBar, "
CASE __UI_Type_MenuItem: a$ = a$ + "__UI_Type_MenuItem, "
CASE __UI_Type_PictureBox: a$ = a$ + "__UI_Type_PictureBox, "
CASE __UI_Type_TrackBar: a$ = a$ + "__UI_Type_TrackBar, "
CASE __UI_Type_ContextMenu: a$ = a$ + "__UI_Type_ContextMenu, "
END SELECT
a$ = a$ + CHR$(34) + RTRIM$(Control(i).Name) + CHR$(34) + ","
a$ = a$ + STR$(Control(i).Width) + ","
a$ = a$ + STR$(Control(i).Height) + ","
a$ = a$ + STR$(Control(i).Left) + ","
a$ = a$ + STR$(Control(i).Top) + ","
IF Control(i).ParentID > 0 THEN
a$ = a$ + " __UI_GetID(" + CHR$(34) + RTRIM$(Control(Control(i).ParentID).Name) + CHR$(34) + "))"
ELSE
a$ = a$ + "0)"
END IF
PRINT #1, a$
b$ = MKI$(-1) + MKL$(0) + MKI$(Control(i).Type) '-1 indicates a new control
b$ = b$ + MKI$(LEN(RTRIM$(Control(i).Name)))
b$ = b$ + RTRIM$(Control(i).Name)
b$ = b$ + MKI$(Control(i).Width) + MKI$(Control(i).Height) + MKI$(Control(i).Left) + MKI$(Control(i).Top) + MKI$(LEN(RTRIM$(Control(Control(i).ParentID).Name))) + RTRIM$(Control(Control(i).ParentID).Name)
PUT #2, , b$
IF LEN(Caption(i)) > 0 THEN
a$ = "SetCaption " + CHR$(34) + RTRIM$(Control(i).Name) + CHR$(34) + ", " + __UI_SpecialCharsToCHR$(Caption(i))
b$ = MKI$(-2) + MKL$(LEN(Caption(i))) '-2 indicates a caption
PUT #2, , b$
PUT #2, , Caption(i)
PRINT #1, a$
END IF
IF LEN(ToolTip(i)) > 0 THEN
a$ = "ToolTip(__UI_GetID(" + CHR$(34) + RTRIM$(Control(i).Name) + CHR$(34) + ")) = " + __UI_SpecialCharsToCHR$(ToolTip(i))
b$ = MKI$(-24) + MKL$(LEN(ToolTip(i))) '-24 indicates a tip
PUT #2, , b$
PUT #2, , ToolTip(i)
PRINT #1, a$
END IF
IF LEN(Text(i)) > 0 THEN
SELECT CASE Control(i).Type
CASE __UI_Type_ListBox, __UI_Type_DropdownList
DIM TempCaption$, TempText$, FindLF&, ThisItem%, ThisItemTop%
DIM LastVisibleItem AS INTEGER
TempText$ = Text(i)
ThisItem% = 0
DO WHILE LEN(TempText$)
ThisItem% = ThisItem% + 1
FindLF& = INSTR(TempText$, CHR$(13))
IF FindLF& THEN
TempCaption$ = LEFT$(TempText$, FindLF& - 1)
TempText$ = MID$(TempText$, FindLF& + 1)
ELSE
TempCaption$ = TempText$
TempText$ = ""
END IF
a$ = "AddItem __UI_GetID(" + CHR$(34) + RTRIM$(Control(i).Name) + CHR$(34) + "), " + CHR$(34) + TempCaption$ + CHR$(34)
PRINT #1, a$
LOOP
CASE __UI_Type_PictureBox, __UI_Type_Button
a$ = "LoadImage Control(__UI_NewID), " + CHR$(34) + Text(i) + CHR$(34)
PRINT #1, a$
CASE ELSE
a$ = "Text(__UI_GetID(" + CHR$(34) + RTRIM$(Control(i).Name) + CHR$(34) + ")) = " + __UI_SpecialCharsToCHR$(Caption(i))
PRINT #1, a$
END SELECT
b$ = MKI$(-3) + MKL$(LEN(Text(i))) '-3 indicates a text
PUT #2, , b$
PUT #2, , Text(i)
END IF
IF Control(i).TransparentColor > 0 THEN
PRINT #1, "__UI_ClearColor Control(__UI_NewID).HelperCanvas, " + LTRIM$(STR$(Control(i).TransparentColor)) + ", -1"
b$ = MKI$(-28) + _MK$(_UNSIGNED LONG, Control(i).TransparentColor)
PUT #2, , b$
END IF
IF Control(i).Stretch THEN
PRINT #1, "Control(__UI_NewID).Stretch = True"
b$ = MKI$(-4)
PUT #2, , b$
END IF
'Inheritable properties won't be saved if they are the same as the parent's
IF Control(i).Type = __UI_Type_Form THEN
IF Control(i).Font = 8 OR Control(i).Font = 16 THEN
'Internal fonts
SaveInternalFont:
FontSetup$ = "SetFont(" + CHR$(34) + "VGA Emulated" + CHR$(34) + ", " + CHR$(34) + CHR$(34) + "," + STR$(Control(__UI_GetFontID(Control(i).Font)).Max) + ", " + CHR$(34) + CHR$(34) + ")"
PRINT #1, "Control(__UI_NewID).Font = " + FontSetup$
FontSetup$ = "**" + LTRIM$(STR$(Control(__UI_GetFontID(Control(i).Font)).Max))
b$ = MKI$(-5) + MKI$(LEN(FontSetup$)) + FontSetup$
PUT #2, , b$
ELSE
SaveExternalFont:
FontSetup$ = "SetFont(" + CHR$(34) + Text(__UI_GetFontID(Control(i).Font)) + CHR$(34) + "," + STR$(Control(__UI_GetFontID(Control(i).Font)).Max) + ", " + CHR$(34) + Caption(__UI_GetFontID(Control(i).Font)) + CHR$(34) + ")"
PRINT #1, "Control(__UI_NewID).Font = " + FontSetup$
FontSetup$ = RTRIM$(Control(__UI_GetFontID(Control(i).Font)).Name) + "\" + Text(__UI_GetFontID(Control(i).Font)) + "\" + LTRIM$(STR$(Control(__UI_GetFontID(Control(i).Font)).Max)) + "\" + Caption(__UI_GetFontID(Control(i).Font))
b$ = MKI$(-5) + MKI$(LEN(FontSetup$)) + FontSetup$
PUT #2, , b$
END IF
ELSE
IF Control(i).ParentID > 0 THEN
IF Control(i).Font > 0 AND Control(i).Font <> Control(Control(i).ParentID).Font THEN
IF Control(i).Font = 8 OR Control(i).Font = 167 THEN
GOTO SaveInternalFont
ELSE
GOTO SaveExternalFont
END IF
END IF
ELSE
IF Control(i).Font > 0 AND Control(i).Font <> Control(__UI_FormID).Font THEN
IF Control(i).Font = 8 OR Control(i).Font = 167 THEN
GOTO SaveInternalFont
ELSE
GOTO SaveExternalFont
END IF
END IF
END IF
END IF
'Colors are saved only if they differ from the theme's defaults
IF Control(i).ForeColor <> __UI_DefaultColor(Control(i).Type, 1) THEN
PRINT #1, "Control(__UI_NewID).ForeColor = _RGB32(" + LTRIM$(STR$(_RED32(Control(i).ForeColor))) + ", " + LTRIM$(STR$(_GREEN32(Control(i).ForeColor))) + ", " + LTRIM$(STR$(_BLUE32(Control(i).ForeColor))) + ")"
b$ = MKI$(-6) + _MK$(_UNSIGNED LONG, Control(i).ForeColor)
PUT #2, , b$
END IF
IF Control(i).BackColor <> __UI_DefaultColor(Control(i).Type, 2) THEN
PRINT #1, "Control(__UI_NewID).BackColor = _RGB32(" + LTRIM$(STR$(_RED32(Control(i).BackColor))) + ", " + LTRIM$(STR$(_GREEN32(Control(i).BackColor))) + ", " + LTRIM$(STR$(_BLUE32(Control(i).BackColor))) + ")"
b$ = MKI$(-7) + _MK$(_UNSIGNED LONG, Control(i).BackColor)
PUT #2, , b$
END IF
IF Control(i).SelectedForeColor <> __UI_DefaultColor(Control(i).Type, 3) THEN
PRINT #1, "Control(__UI_NewID).SelectedForeColor = _RGB32(" + LTRIM$(STR$(_RED32(Control(i).SelectedForeColor))) + ", " + LTRIM$(STR$(_GREEN32(Control(i).SelectedForeColor))) + ", " + LTRIM$(STR$(_BLUE32(Control(i).SelectedForeColor))) + ")"
b$ = MKI$(-8) + _MK$(_UNSIGNED LONG, Control(i).SelectedForeColor)
PUT #2, , b$
END IF
IF Control(i).SelectedBackColor <> __UI_DefaultColor(Control(i).Type, 4) THEN
PRINT #1, "Control(__UI_NewID).SelectedBackColor = _RGB32(" + LTRIM$(STR$(_RED32(Control(i).SelectedBackColor))) + ", " + LTRIM$(STR$(_GREEN32(Control(i).SelectedBackColor))) + ", " + LTRIM$(STR$(_BLUE32(Control(i).SelectedBackColor))) + ")"
b$ = MKI$(-9) + _MK$(_UNSIGNED LONG, Control(i).SelectedBackColor)
PUT #2, , b$
END IF
IF Control(i).BorderColor <> __UI_DefaultColor(Control(i).Type, 5) THEN
PRINT #1, "Control(__UI_NewID).BorderColor = _RGB32(" + LTRIM$(STR$(_RED32(Control(i).BorderColor))) + ", " + LTRIM$(STR$(_GREEN32(Control(i).BorderColor))) + ", " + LTRIM$(STR$(_BLUE32(Control(i).BorderColor))) + ")"
b$ = MKI$(-10) + _MK$(_UNSIGNED LONG, Control(i).BorderColor)
PUT #2, , b$
END IF
IF Control(i).BackStyle = __UI_Transparent THEN
PRINT #1, "Control(__UI_NewID).BackStyle = __UI_Transparent"
b$ = MKI$(-11): PUT #2, , b$
END IF
IF Control(i).HasBorder THEN
PRINT #1, "Control(__UI_NewID).HasBorder = True"
b$ = MKI$(-12): PUT #2, , b$
END IF
IF Control(i).Align = __UI_Center THEN
PRINT #1, "Control(__UI_NewID).Align = __UI_Center"
b$ = MKI$(-13) + _MK$(_BYTE, Control(i).Align): PUT #2, , b$
ELSEIF Control(i).Align = __UI_Right THEN
PRINT #1, "Control(__UI_NewID).Align = __UI_Right"
b$ = MKI$(-13) + _MK$(_BYTE, Control(i).Align): PUT #2, , b$
END IF
IF Control(i).Value <> 0 THEN
PRINT #1, "Control(__UI_NewID).Value = " + LTRIM$(STR$(Control(i).Value))
b$ = MKI$(-14) + _MK$(_FLOAT, Control(i).Value): PUT #2, , b$
END IF
IF Control(i).Min <> 0 THEN
PRINT #1, "Control(__UI_NewID).Min = " + LTRIM$(STR$(Control(i).Min))
b$ = MKI$(-15) + _MK$(_FLOAT, Control(i).Min): PUT #2, , b$
END IF
IF Control(i).Max <> 0 THEN
PRINT #1, "Control(__UI_NewID).Max = " + LTRIM$(STR$(Control(i).Max))
b$ = MKI$(-16) + _MK$(_FLOAT, Control(i).Max): PUT #2, , b$
END IF
IF Control(i).HotKey <> 0 THEN
PRINT #1, "Control(__UI_NewID).HotKey = " + LTRIM$(STR$(Control(i).HotKey))
b$ = MKI$(-17) + MKI$(Control(i).HotKey): PUT #2, , b$
END IF
IF Control(i).HotKeyOffset <> 0 THEN
PRINT #1, "Control(__UI_NewID).HotKeyOffset = " + LTRIM$(STR$(Control(i).HotKeyOffset))
b$ = MKI$(-18) + MKI$(Control(i).HotKeyOffset): PUT #2, , b$
END IF
IF Control(i).ShowPercentage THEN
PRINT #1, "Control(__UI_NewID).ShowPercentage = True"
b$ = MKI$(-19): PUT #2, , b$
END IF
IF Control(i).CanHaveFocus THEN
PRINT #1, "Control(__UI_NewID).CanHaveFocus = True"
b$ = MKI$(-20): PUT #2, , b$
END IF
IF Control(i).Disabled THEN
PRINT #1, "Control(__UI_NewID).Disabled = True"
b$ = MKI$(-21): PUT #2, , b$
END IF
IF Control(i).Hidden THEN
PRINT #1, "Control(__UI_NewID).Hidden = True"
b$ = MKI$(-22): PUT #2, , b$
END IF
IF Control(i).CenteredWindow THEN
PRINT #1, "Control(__UI_NewID).CenteredWindow = True"
b$ = MKI$(-23): PUT #2, , b$
END IF
IF Control(i).ContextMenuID THEN
PRINT #1, "Control(__UI_NewID).ContextMenuID = __UI_GetID(" + CHR$(34) + RTRIM$(Control(Control(i).ContextMenuID).Name) + CHR$(34) + ")"
b$ = MKI$(-25) + MKI$(LEN(RTRIM$(Control(Control(i).ContextMenuID).Name))) + RTRIM$(Control(Control(i).ContextMenuID).Name): PUT #2, , b$
END IF
IF Control(i).Interval THEN
PRINT #1, "Control(__UI_NewID).Interval = " + LTRIM$(STR$(Control(i).Interval))
b$ = MKI$(-26) + _MK$(_FLOAT, Control(i).Interval): PUT #2, , b$
END IF
IF Control(i).WordWrap THEN
PRINT #1, "Control(__UI_NewID).WordWrap = True"
b$ = MKI$(-27): PUT #2, , b$
END IF
PRINT #1,
END IF
NEXT
b$ = MKI$(-1024): PUT #2, , b$ 'end of file
CLOSE #1, #2
END SUB
'$IF WIN THEN '$IF WIN THEN
' SUB LoadFontList ' SUB LoadFontList
' DIM hKey AS _OFFSET ' DIM hKey AS _OFFSET

View file

@ -6,7 +6,7 @@ SUB __UI_LoadForm
DIM __UI_NewID AS LONG DIM __UI_NewID AS LONG
__UI_NewID = __UI_NewControl(__UI_Type_Form, "UiEditorForm", 598, 430, 0, 0, 0) __UI_NewID = __UI_NewControl(__UI_Type_Form, "UiEditorForm", 598, 430, 0, 0, 0)
SetCaption "UiEditorForm", UiEditorTitle$ SetCaption __UI_NewID, UiEditorTitle$
$IF WIN THEN $IF WIN THEN
Control(__UI_NewID).Font = SetFont("segoeui.ttf", 12, "") Control(__UI_NewID).Font = SetFont("segoeui.ttf", 12, "")
$ELSE $ELSE
@ -14,117 +14,117 @@ SUB __UI_LoadForm
$END IF $END IF
__UI_NewID = __UI_NewControl(__UI_Type_MenuBar, "FileMenu", 44, 18, 8, 0, 0) __UI_NewID = __UI_NewControl(__UI_Type_MenuBar, "FileMenu", 44, 18, 8, 0, 0)
SetCaption "FileMenu", "&File" SetCaption __UI_NewID, "&File"
__UI_NewID = __UI_NewControl(__UI_Type_MenuBar, "EditMenu", 44, 18, 52, 0, 0) __UI_NewID = __UI_NewControl(__UI_Type_MenuBar, "EditMenu", 44, 18, 52, 0, 0)
SetCaption "EditMenu", "&Edit" SetCaption __UI_NewID, "&Edit"
__UI_NewID = __UI_NewControl(__UI_Type_MenuBar, "ViewMenu", 44, 18, 52, 0, 0) __UI_NewID = __UI_NewControl(__UI_Type_MenuBar, "ViewMenu", 44, 18, 52, 0, 0)
SetCaption "ViewMenu", "&View" SetCaption __UI_NewID, "&View"
__UI_NewID = __UI_NewControl(__UI_Type_MenuBar, "InsertMenu", 44, 18, 52, 0, 0) __UI_NewID = __UI_NewControl(__UI_Type_MenuBar, "InsertMenu", 44, 18, 52, 0, 0)
SetCaption "InsertMenu", "&Insert" SetCaption __UI_NewID, "&Insert"
__UI_NewID = __UI_NewControl(__UI_Type_MenuBar, "AlignMenu", 0, 0, 0, 0, 0) __UI_NewID = __UI_NewControl(__UI_Type_MenuBar, "AlignMenu", 0, 0, 0, 0, 0)
SetCaption "AlignMenu", "&Align" SetCaption __UI_NewID, "&Align"
__UI_NewID = __UI_NewControl(__UI_Type_MenuBar, "OptionsMenu", 44, 18, 52, 0, 0) __UI_NewID = __UI_NewControl(__UI_Type_MenuBar, "OptionsMenu", 44, 18, 52, 0, 0)
SetCaption "OptionsMenu", "&Options" SetCaption __UI_NewID, "&Options"
__UI_NewID = __UI_NewControl(__UI_Type_MenuBar, "HelpMenu", 44, 18, 545, 0, 0) __UI_NewID = __UI_NewControl(__UI_Type_MenuBar, "HelpMenu", 44, 18, 545, 0, 0)
SetCaption "HelpMenu", "&Help" SetCaption __UI_NewID, "&Help"
Control(__UI_NewID).Align = __UI_Right Control(__UI_NewID).Align = __UI_Right
__UI_NewID = __UI_NewControl(__UI_Type_Frame, "ToolBox", 62, 376, 30, 40, 0) __UI_NewID = __UI_NewControl(__UI_Type_Frame, "ToolBox", 62, 376, 30, 40, 0)
Control(__UI_NewID).HasBorder = True Control(__UI_NewID).HasBorder = True
__UI_NewID = __UI_NewControl(__UI_Type_Frame, "PropertiesFrame", 457, 186, 110, 40, 0) __UI_NewID = __UI_NewControl(__UI_Type_Frame, "PropertiesFrame", 457, 186, 110, 40, 0)
SetCaption "PropertiesFrame", "Control properties: Main form" SetCaption __UI_NewID, "Control properties: Main form"
Control(__UI_NewID).HasBorder = True Control(__UI_NewID).HasBorder = True
__UI_NewID = __UI_NewControl(__UI_Type_Frame, "ColorMixer", 457, 175, 110, 240, 0) __UI_NewID = __UI_NewControl(__UI_Type_Frame, "ColorMixer", 457, 175, 110, 240, 0)
SetCaption "ColorMixer", "Color mixer" SetCaption __UI_NewID, "Color mixer"
Control(__UI_NewID).HasBorder = True Control(__UI_NewID).HasBorder = True
__UI_NewID = __UI_NewControl(__UI_Type_MenuItem, "FileMenuNew", 91, 18, 0, 22, __UI_GetID("FileMenu")) __UI_NewID = __UI_NewControl(__UI_Type_MenuItem, "FileMenuNew", 91, 18, 0, 22, __UI_GetID("FileMenu"))
SetCaption "FileMenuNew", "&New" SetCaption __UI_NewID, "&New"
__UI_NewID = __UI_NewControl(__UI_Type_MenuItem, "FileMenuOpen", 91, 18, 0, 22, __UI_GetID("FileMenu")) __UI_NewID = __UI_NewControl(__UI_Type_MenuItem, "FileMenuOpen", 91, 18, 0, 22, __UI_GetID("FileMenu"))
SetCaption "FileMenuOpen", "&Open..." SetCaption __UI_NewID, "&Open..."
__UI_NewID = __UI_NewControl(__UI_Type_MenuItem, "FileMenuSave", 91, 18, 0, 22, __UI_GetID("FileMenu")) __UI_NewID = __UI_NewControl(__UI_Type_MenuItem, "FileMenuSave", 91, 18, 0, 22, __UI_GetID("FileMenu"))
SetCaption "FileMenuSave", "&Save form-" SetCaption __UI_NewID, "&Save form-"
ToolTip(__UI_NewID) = "File name is automatically taken from your form's name property" ToolTip(__UI_NewID) = "File name is automatically taken from your form's name property"
__UI_NewID = __UI_NewControl(__UI_Type_MenuItem, "FileMenuExit", 56, 18, 0, 40, __UI_GetID("FileMenu")) __UI_NewID = __UI_NewControl(__UI_Type_MenuItem, "FileMenuExit", 56, 18, 0, 40, __UI_GetID("FileMenu"))
SetCaption "FileMenuExit", "E&xit" SetCaption __UI_NewID, "E&xit"
__UI_NewID = __UI_NewControl(__UI_Type_MenuItem, "EditMenuUndo", 56, 18, 0, 40, __UI_GetID("EditMenu")) __UI_NewID = __UI_NewControl(__UI_Type_MenuItem, "EditMenuUndo", 56, 18, 0, 40, __UI_GetID("EditMenu"))
SetCaption "EditMenuUndo", "&Undo" SetCaption __UI_NewID, "&Undo"
__UI_NewID = __UI_NewControl(__UI_Type_MenuItem, "EditMenuRedo", 56, 18, 0, 40, __UI_GetID("EditMenu")) __UI_NewID = __UI_NewControl(__UI_Type_MenuItem, "EditMenuRedo", 56, 18, 0, 40, __UI_GetID("EditMenu"))
SetCaption "EditMenuRedo", "&Redo-" SetCaption __UI_NewID, "&Redo-"
__UI_NewID = __UI_NewControl(__UI_Type_MenuItem, "EditMenuZOrdering", 56, 18, 0, 40, __UI_GetID("EditMenu")) __UI_NewID = __UI_NewControl(__UI_Type_MenuItem, "EditMenuZOrdering", 56, 18, 0, 40, __UI_GetID("EditMenu"))
SetCaption "EditMenuZOrdering", "&Z-Ordering" SetCaption __UI_NewID, "&Z-Ordering"
__UI_NewID = __UI_NewControl(__UI_Type_MenuItem, "ViewMenuPreviewDetach", 56, 18, 0, 40, __UI_GetID("ViewMenu")) __UI_NewID = __UI_NewControl(__UI_Type_MenuItem, "ViewMenuPreviewDetach", 56, 18, 0, 40, __UI_GetID("ViewMenu"))
SetCaption "ViewMenuPreviewDetach", "&Keep preview window attached" SetCaption __UI_NewID, "&Keep preview window attached"
Control(__UI_NewID).Value = -1 Control(__UI_NewID).Value = -1
__UI_NewID = __UI_NewControl(__UI_Type_MenuItem, "ViewMenuPreview", 56, 18, 0, 40, __UI_GetID("ViewMenu")) __UI_NewID = __UI_NewControl(__UI_Type_MenuItem, "ViewMenuPreview", 56, 18, 0, 40, __UI_GetID("ViewMenu"))
SetCaption "ViewMenuPreview", "&Open preview window-" SetCaption __UI_NewID, "&Open preview window-"
__UI_NewID = __UI_NewControl(__UI_Type_MenuItem, "ViewMenuLoadedFonts", 56, 18, 0, 40, __UI_GetID("ViewMenu")) __UI_NewID = __UI_NewControl(__UI_Type_MenuItem, "ViewMenuLoadedFonts", 56, 18, 0, 40, __UI_GetID("ViewMenu"))
SetCaption "ViewMenuLoadedFonts", "&Loaded fonts" SetCaption __UI_NewID, "&Loaded fonts"
__UI_NewID = __UI_NewControl(__UI_Type_MenuItem, "InsertMenuMenuBar", 0, 0, 0, 0, __UI_GetID("InsertMenu")) __UI_NewID = __UI_NewControl(__UI_Type_MenuItem, "InsertMenuMenuBar", 0, 0, 0, 0, __UI_GetID("InsertMenu"))
SetCaption "InsertMenuMenuBar", "Menu &Bar" SetCaption __UI_NewID, "Menu &Bar"
__UI_NewID = __UI_NewControl(__UI_Type_MenuItem, "InsertMenuMenuItem", 0, 0, 0, 0, __UI_GetID("InsertMenu")) __UI_NewID = __UI_NewControl(__UI_Type_MenuItem, "InsertMenuMenuItem", 0, 0, 0, 0, __UI_GetID("InsertMenu"))
SetCaption "InsertMenuMenuItem", "Menu &Item" SetCaption __UI_NewID, "Menu &Item"
Control(__UI_NewID).Disabled = True Control(__UI_NewID).Disabled = True
__UI_NewID = __UI_NewControl(__UI_Type_MenuItem, "AlignMenuAlignLeft", 0, 0, 0, 0, __UI_GetID("AlignMenu")) __UI_NewID = __UI_NewControl(__UI_Type_MenuItem, "AlignMenuAlignLeft", 0, 0, 0, 0, __UI_GetID("AlignMenu"))
SetCaption "AlignMenuAlignLeft", "Align &Left" SetCaption __UI_NewID, "Align &Left"
__UI_NewID = __UI_NewControl(__UI_Type_MenuItem, "AlignMenuAlignRight", 0, 0, 0, 0, __UI_GetID("AlignMenu")) __UI_NewID = __UI_NewControl(__UI_Type_MenuItem, "AlignMenuAlignRight", 0, 0, 0, 0, __UI_GetID("AlignMenu"))
SetCaption "AlignMenuAlignRight", "Align &Right" SetCaption __UI_NewID, "Align &Right"
__UI_NewID = __UI_NewControl(__UI_Type_MenuItem, "AlignMenuAlignTops", 0, 0, 0, 0, __UI_GetID("AlignMenu")) __UI_NewID = __UI_NewControl(__UI_Type_MenuItem, "AlignMenuAlignTops", 0, 0, 0, 0, __UI_GetID("AlignMenu"))
SetCaption "AlignMenuAlignTops", "Align T&op" SetCaption __UI_NewID, "Align T&op"
__UI_NewID = __UI_NewControl(__UI_Type_MenuItem, "AlignMenuAlignBottoms", 0, 0, 0, 0, __UI_GetID("AlignMenu")) __UI_NewID = __UI_NewControl(__UI_Type_MenuItem, "AlignMenuAlignBottoms", 0, 0, 0, 0, __UI_GetID("AlignMenu"))
SetCaption "AlignMenuAlignBottoms", "Align &Bottom-" SetCaption __UI_NewID, "Align &Bottom-"
__UI_NewID = __UI_NewControl(__UI_Type_MenuItem, "AlignMenuAlignCentersV", 0, 0, 0, 0, __UI_GetID("AlignMenu")) __UI_NewID = __UI_NewControl(__UI_Type_MenuItem, "AlignMenuAlignCentersV", 0, 0, 0, 0, __UI_GetID("AlignMenu"))
SetCaption "AlignMenuAlignCentersV", "Align cent&ers Vertically" SetCaption __UI_NewID, "Align cent&ers Vertically"
__UI_NewID = __UI_NewControl(__UI_Type_MenuItem, "AlignMenuAlignCentersH", 0, 0, 0, 0, __UI_GetID("AlignMenu")) __UI_NewID = __UI_NewControl(__UI_Type_MenuItem, "AlignMenuAlignCentersH", 0, 0, 0, 0, __UI_GetID("AlignMenu"))
SetCaption "AlignMenuAlignCentersH", "Ali&gn centers Horizontally" SetCaption __UI_NewID, "Ali&gn centers Horizontally"
__UI_NewID = __UI_NewControl(__UI_Type_MenuItem, "AlignMenuAlignCenterV", 0, 0, 0, 0, __UI_GetID("AlignMenu")) __UI_NewID = __UI_NewControl(__UI_Type_MenuItem, "AlignMenuAlignCenterV", 0, 0, 0, 0, __UI_GetID("AlignMenu"))
SetCaption "AlignMenuAlignCenterV", "Center &Vertically" SetCaption __UI_NewID, "Center &Vertically"
__UI_NewID = __UI_NewControl(__UI_Type_MenuItem, "AlignMenuAlignCenterH", 0, 0, 0, 0, __UI_GetID("AlignMenu")) __UI_NewID = __UI_NewControl(__UI_Type_MenuItem, "AlignMenuAlignCenterH", 0, 0, 0, 0, __UI_GetID("AlignMenu"))
SetCaption "AlignMenuAlignCenterH", "Center &Horizontally-" SetCaption __UI_NewID, "Center &Horizontally-"
__UI_NewID = __UI_NewControl(__UI_Type_MenuItem, "AlignMenuDistributeV", 0, 0, 0, 0, __UI_GetID("AlignMenu")) __UI_NewID = __UI_NewControl(__UI_Type_MenuItem, "AlignMenuDistributeV", 0, 0, 0, 0, __UI_GetID("AlignMenu"))
SetCaption "AlignMenuDistributeV", "Distribute Ver&tically" SetCaption __UI_NewID, "Distribute Ver&tically"
__UI_NewID = __UI_NewControl(__UI_Type_MenuItem, "AlignMenuDistributeH", 0, 0, 0, 0, __UI_GetID("AlignMenu")) __UI_NewID = __UI_NewControl(__UI_Type_MenuItem, "AlignMenuDistributeH", 0, 0, 0, 0, __UI_GetID("AlignMenu"))
SetCaption "AlignMenuDistributeH", "Distribute Hori&zontally" SetCaption __UI_NewID, "Distribute Hori&zontally"
__UI_NewID = __UI_NewControl(__UI_Type_MenuItem, "OptionsMenuAutoName", 0, 0, 0, 0, __UI_GetID("OptionsMenu")) __UI_NewID = __UI_NewControl(__UI_Type_MenuItem, "OptionsMenuAutoName", 0, 0, 0, 0, __UI_GetID("OptionsMenu"))
SetCaption "OptionsMenuAutoName", "&Auto-name controls" SetCaption __UI_NewID, "&Auto-name controls"
Control(__UI_NewID).Value = True Control(__UI_NewID).Value = True
ToolTip(__UI_GetID("OptionsMenuAutoName")) = "Automatically set control names based on caption and type" ToolTip(__UI_NewID) = "Automatically set control names based on caption and type"
__UI_NewID = __UI_NewControl(__UI_Type_MenuItem, "HelpMenuHelp", 0, 0, 0, 0, __UI_GetID("HelpMenu")) __UI_NewID = __UI_NewControl(__UI_Type_MenuItem, "HelpMenuHelp", 0, 0, 0, 0, __UI_GetID("HelpMenu"))
SetCaption "HelpMenuHelp", "&What's all this?-" SetCaption __UI_NewID, "&What's all this?-"
__UI_NewID = __UI_NewControl(__UI_Type_MenuItem, "HelpMenuAbout", 0, 0, 0, 0, __UI_GetID("HelpMenu")) __UI_NewID = __UI_NewControl(__UI_Type_MenuItem, "HelpMenuAbout", 0, 0, 0, 0, __UI_GetID("HelpMenu"))
SetCaption "HelpMenuAbout", "&About..." SetCaption __UI_NewID, "&About..."
__UI_NewID = __UI_NewControl(__UI_Type_Button, "AddButton", 22, 22, 20, 26, __UI_GetID("ToolBox")) __UI_NewID = __UI_NewControl(__UI_Type_Button, "AddButton", 22, 22, 20, 26, __UI_GetID("ToolBox"))
Control(__UI_NewID).CanHaveFocus = True Control(__UI_NewID).CanHaveFocus = True
@ -160,20 +160,20 @@ SUB __UI_LoadForm
Control(__UI_NewID).CanHaveFocus = True Control(__UI_NewID).CanHaveFocus = True
__UI_NewID = __UI_NewControl(__UI_Type_DropdownList, "PropertiesList", 174, 23, 20, 20, __UI_GetID("PropertiesFrame")) __UI_NewID = __UI_NewControl(__UI_Type_DropdownList, "PropertiesList", 174, 23, 20, 20, __UI_GetID("PropertiesFrame"))
AddItem __UI_GetID("PropertiesList"), "Name" AddItem __UI_NewID, "Name"
AddItem __UI_GetID("PropertiesList"), "Caption" AddItem __UI_NewID, "Caption"
AddItem __UI_GetID("PropertiesList"), "Text" AddItem __UI_NewID, "Text"
AddItem __UI_GetID("PropertiesList"), "Top" AddItem __UI_NewID, "Top"
AddItem __UI_GetID("PropertiesList"), "Left" AddItem __UI_NewID, "Left"
AddItem __UI_GetID("PropertiesList"), "Width" AddItem __UI_NewID, "Width"
AddItem __UI_GetID("PropertiesList"), "Height" AddItem __UI_NewID, "Height"
AddItem __UI_GetID("PropertiesList"), "Font" AddItem __UI_NewID, "Font"
AddItem __UI_GetID("PropertiesList"), "Tool tip" AddItem __UI_NewID, "Tool tip"
AddItem __UI_GetID("PropertiesList"), "Value" AddItem __UI_NewID, "Value"
AddItem __UI_GetID("PropertiesList"), "Min" AddItem __UI_NewID, "Min"
AddItem __UI_GetID("PropertiesList"), "Max" AddItem __UI_NewID, "Max"
AddItem __UI_GetID("PropertiesList"), "Interval" AddItem __UI_NewID, "Interval"
AddItem __UI_GetID("PropertiesList"), "Padding (Left/Right)" AddItem __UI_NewID, "Padding (Left/Right)"
Control(__UI_NewID).HasBorder = True Control(__UI_NewID).HasBorder = True
Control(__UI_NewID).Value = 1 Control(__UI_NewID).Value = 1
Control(__UI_NewID).Max = 14 Control(__UI_NewID).Max = 14
@ -188,54 +188,53 @@ SUB __UI_LoadForm
Control(__UI_NewID).BackStyle = __UI_Transparent Control(__UI_NewID).BackStyle = __UI_Transparent
__UI_NewID = __UI_NewControl(__UI_Type_CheckBox, "Stretch", 150, 17, 22, 55, __UI_GetID("PropertiesFrame")) __UI_NewID = __UI_NewControl(__UI_Type_CheckBox, "Stretch", 150, 17, 22, 55, __UI_GetID("PropertiesFrame"))
SetCaption "Stretch", "Stretch" SetCaption __UI_NewID, "Stretch"
Control(__UI_NewID).CanHaveFocus = True Control(__UI_NewID).CanHaveFocus = True
__UI_NewID = __UI_NewControl(__UI_Type_CheckBox, "HasBorder", 150, 17, 22, 75, __UI_GetID("PropertiesFrame")) __UI_NewID = __UI_NewControl(__UI_Type_CheckBox, "HasBorder", 150, 17, 22, 75, __UI_GetID("PropertiesFrame"))
SetCaption "HasBorder", "Has border" SetCaption __UI_NewID, "Has border"
Control(__UI_NewID).CanHaveFocus = True Control(__UI_NewID).CanHaveFocus = True
__UI_NewID = __UI_NewControl(__UI_Type_CheckBox, "ShowPercentage", 149, 17, 22, 95, __UI_GetID("PropertiesFrame")) __UI_NewID = __UI_NewControl(__UI_Type_CheckBox, "ShowPercentage", 149, 17, 22, 95, __UI_GetID("PropertiesFrame"))
SetCaption "ShowPercentage", "Show percentage" SetCaption __UI_NewID, "Show percentage"
Control(__UI_NewID).CanHaveFocus = True Control(__UI_NewID).CanHaveFocus = True
__UI_NewID = __UI_NewControl(__UI_Type_CheckBox, "PasswordMaskCB", 149, 17, 22, 115, __UI_GetID("PropertiesFrame")) __UI_NewID = __UI_NewControl(__UI_Type_CheckBox, "PasswordMaskCB", 149, 17, 22, 115, __UI_GetID("PropertiesFrame"))
SetCaption "PasswordMaskCB", "Password mask" SetCaption __UI_NewID, "Password mask"
Control(__UI_NewID).CanHaveFocus = True Control(__UI_NewID).CanHaveFocus = True
__UI_NewID = __UI_NewControl(__UI_Type_CheckBox, "WordWrap", 115, 17, 182, 55, __UI_GetID("PropertiesFrame")) __UI_NewID = __UI_NewControl(__UI_Type_CheckBox, "WordWrap", 115, 17, 182, 55, __UI_GetID("PropertiesFrame"))
SetCaption "WordWrap", "Word wrap" SetCaption __UI_NewID, "Word wrap"
Control(__UI_NewID).CanHaveFocus = True Control(__UI_NewID).CanHaveFocus = True
__UI_NewID = __UI_NewControl(__UI_Type_CheckBox, "CanHaveFocus", 117, 17, 182, 75, __UI_GetID("PropertiesFrame")) __UI_NewID = __UI_NewControl(__UI_Type_CheckBox, "CanHaveFocus", 117, 17, 182, 75, __UI_GetID("PropertiesFrame"))
SetCaption "CanHaveFocus", "Can have focus" SetCaption __UI_NewID, "Can have focus"
Control(__UI_NewID).CanHaveFocus = True Control(__UI_NewID).CanHaveFocus = True
__UI_NewID = __UI_NewControl(__UI_Type_CheckBox, "Disabled", 105, 17, 182, 95, __UI_GetID("PropertiesFrame")) __UI_NewID = __UI_NewControl(__UI_Type_CheckBox, "Disabled", 105, 17, 182, 95, __UI_GetID("PropertiesFrame"))
SetCaption "Disabled", "Disabled" SetCaption __UI_NewID, "Disabled"
Control(__UI_NewID).CanHaveFocus = True Control(__UI_NewID).CanHaveFocus = True
__UI_NewID = __UI_NewControl(__UI_Type_CheckBox, "Transparent", 105, 17, 182, 115, __UI_GetID("PropertiesFrame")) __UI_NewID = __UI_NewControl(__UI_Type_CheckBox, "Transparent", 105, 17, 182, 115, __UI_GetID("PropertiesFrame"))
SetCaption "Transparent", "Transparent" SetCaption __UI_NewID, "Transparent"
Control(__UI_NewID).CanHaveFocus = True Control(__UI_NewID).CanHaveFocus = True
__UI_NewID = __UI_NewControl(__UI_Type_CheckBox, "Hidden", 110, 17, 329, 55, __UI_GetID("PropertiesFrame")) __UI_NewID = __UI_NewControl(__UI_Type_CheckBox, "Hidden", 110, 17, 329, 55, __UI_GetID("PropertiesFrame"))
SetCaption "Hidden", "Hidden" SetCaption __UI_NewID, "Hidden"
Control(__UI_NewID).CanHaveFocus = True Control(__UI_NewID).CanHaveFocus = True
__UI_NewID = __UI_NewControl(__UI_Type_CheckBox, "CenteredWindow", 116, 17, 329, 75, __UI_GetID("PropertiesFrame")) __UI_NewID = __UI_NewControl(__UI_Type_CheckBox, "CenteredWindow", 116, 17, 329, 75, __UI_GetID("PropertiesFrame"))
SetCaption "CenteredWindow", "Centered window" SetCaption __UI_NewID, "Centered window"
Control(__UI_NewID).CanHaveFocus = True Control(__UI_NewID).CanHaveFocus = True
__UI_NewID = __UI_NewControl(__UI_Type_CheckBox, "Resizable", 102, 17, 329, 95, __UI_GetID("PropertiesFrame")) __UI_NewID = __UI_NewControl(__UI_Type_CheckBox, "Resizable", 102, 17, 329, 95, __UI_GetID("PropertiesFrame"))
SetCaption "Resizable", "Resizable" SetCaption __UI_NewID, "Resizable"
Control(__UI_NewID).CanHaveFocus = True Control(__UI_NewID).CanHaveFocus = True
__UI_NewID = __UI_NewControl(__UI_Type_Label, "Label1", 63, 20, 24, 151, __UI_GetID("PropertiesFrame")) __UI_NewID = __UI_NewControl(__UI_Type_Label, "Label1", 63, 20, 24, 151, __UI_GetID("PropertiesFrame"))
SetCaption "Label1", "Text align:" SetCaption __UI_NewID, "Text align:"
__UI_NewID = __UI_NewControl(__UI_Type_DropdownList, "AlignOptions", 102, 20, 102, 151, __UI_GetID("PropertiesFrame")) __UI_NewID = __UI_NewControl(__UI_Type_DropdownList, "AlignOptions", 102, 20, 102, 151, __UI_GetID("PropertiesFrame"))
SetCaption "AlignOptions", "Left"
AddItem __UI_NewID, "Left" AddItem __UI_NewID, "Left"
AddItem __UI_NewID, "Center" AddItem __UI_NewID, "Center"
AddItem __UI_NewID, "Right" AddItem __UI_NewID, "Right"
@ -245,7 +244,7 @@ SUB __UI_LoadForm
Control(__UI_NewID).CanHaveFocus = True Control(__UI_NewID).CanHaveFocus = True
__UI_NewID = __UI_NewControl(__UI_Type_Label, "VerticalAlignLB", 79, 20, 241, 151, __UI_GetID("PropertiesFrame")) __UI_NewID = __UI_NewControl(__UI_Type_Label, "VerticalAlignLB", 79, 20, 241, 151, __UI_GetID("PropertiesFrame"))
SetCaption "VerticalAlignLB", "Vertical align:" SetCaption __UI_NewID, "Vertical align:"
__UI_NewID = __UI_NewControl(__UI_Type_DropdownList, "VAlignOptions", 102, 20, 320, 151, __UI_GetID("PropertiesFrame")) __UI_NewID = __UI_NewControl(__UI_Type_DropdownList, "VAlignOptions", 102, 20, 320, 151, __UI_GetID("PropertiesFrame"))
AddItem __UI_NewID, "Top" AddItem __UI_NewID, "Top"
@ -307,12 +306,12 @@ SUB __UI_LoadForm
Control(__UI_NewID).BackColor = Darken(__UI_DefaultColor(__UI_Type_Form, 2), 105) Control(__UI_NewID).BackColor = Darken(__UI_DefaultColor(__UI_Type_Form, 2), 105)
__UI_NewID = __UI_NewControl(__UI_Type_Frame, "OpenFrame", 463, 289, -600, -500, 0) __UI_NewID = __UI_NewControl(__UI_Type_Frame, "OpenFrame", 463, 289, -600, -500, 0)
SetCaption "OpenFrame", "Open" SetCaption __UI_NewID, "Open"
Control(__UI_NewID).HasBorder = True Control(__UI_NewID).HasBorder = True
Control(__UI_NewID).BackColor = Darken(__UI_DefaultColor(__UI_Type_Form, 2), 105) Control(__UI_NewID).BackColor = Darken(__UI_DefaultColor(__UI_Type_Form, 2), 105)
__UI_NewID = __UI_NewControl(__UI_Type_Label, "FileNameLB", 73, 23, 15, 16, __UI_GetID("OpenFrame")) __UI_NewID = __UI_NewControl(__UI_Type_Label, "FileNameLB", 73, 23, 15, 16, __UI_GetID("OpenFrame"))
SetCaption "FileNameLB", "File &name:" SetCaption __UI_NewID, "File &name:"
Control(__UI_NewID).BackStyle = __UI_Transparent Control(__UI_NewID).BackStyle = __UI_Transparent
__UI_NewID = __UI_NewControl(__UI_Type_TextBox, "FileNameTextBox", 363, 23, 89, 16, __UI_GetID("OpenFrame")) __UI_NewID = __UI_NewControl(__UI_Type_TextBox, "FileNameTextBox", 363, 23, 89, 16, __UI_GetID("OpenFrame"))
@ -320,11 +319,11 @@ SUB __UI_LoadForm
Control(__UI_NewID).CanHaveFocus = True Control(__UI_NewID).CanHaveFocus = True
__UI_NewID = __UI_NewControl(__UI_Type_Label, "PathLB", 437, 23, 15, 44, __UI_GetID("OpenFrame")) __UI_NewID = __UI_NewControl(__UI_Type_Label, "PathLB", 437, 23, 15, 44, __UI_GetID("OpenFrame"))
SetCaption "PathLB", "Path: C:\QB64" SetCaption __UI_NewID, "Path: C:\QB64"
Control(__UI_NewID).BackStyle = __UI_Transparent Control(__UI_NewID).BackStyle = __UI_Transparent
__UI_NewID = __UI_NewControl(__UI_Type_Label, "FilesLB", 200, 23, 25, 75, __UI_GetID("OpenFrame")) __UI_NewID = __UI_NewControl(__UI_Type_Label, "FilesLB", 200, 23, 25, 75, __UI_GetID("OpenFrame"))
SetCaption "FilesLB", "&Files:" SetCaption __UI_NewID, "&Files:"
Control(__UI_NewID).BackStyle = __UI_Transparent Control(__UI_NewID).BackStyle = __UI_Transparent
__UI_NewID = __UI_NewControl(__UI_Type_ListBox, "FileList", 200, 150, 25, 99, __UI_GetID("OpenFrame")) __UI_NewID = __UI_NewControl(__UI_Type_ListBox, "FileList", 200, 150, 25, 99, __UI_GetID("OpenFrame"))
@ -332,7 +331,7 @@ SUB __UI_LoadForm
Control(__UI_NewID).CanHaveFocus = True Control(__UI_NewID).CanHaveFocus = True
__UI_NewID = __UI_NewControl(__UI_Type_Label, "PathsLB", 200, 23, 242, 75, __UI_GetID("OpenFrame")) __UI_NewID = __UI_NewControl(__UI_Type_Label, "PathsLB", 200, 23, 242, 75, __UI_GetID("OpenFrame"))
SetCaption "PathsLB", "&Paths:" SetCaption __UI_NewID, "&Paths:"
Control(__UI_NewID).BackStyle = __UI_Transparent Control(__UI_NewID).BackStyle = __UI_Transparent
__UI_NewID = __UI_NewControl(__UI_Type_ListBox, "DirList", 200, 150, 242, 99, __UI_GetID("OpenFrame")) __UI_NewID = __UI_NewControl(__UI_Type_ListBox, "DirList", 200, 150, 242, 99, __UI_GetID("OpenFrame"))
@ -340,15 +339,15 @@ SUB __UI_LoadForm
Control(__UI_NewID).CanHaveFocus = True Control(__UI_NewID).CanHaveFocus = True
__UI_NewID = __UI_NewControl(__UI_Type_Button, "OpenBT", 80, 23, 274, 255, __UI_GetID("OpenFrame")) __UI_NewID = __UI_NewControl(__UI_Type_Button, "OpenBT", 80, 23, 274, 255, __UI_GetID("OpenFrame"))
SetCaption "OpenBT", "&Open" SetCaption __UI_NewID, "&Open"
Control(__UI_NewID).CanHaveFocus = True Control(__UI_NewID).CanHaveFocus = True
__UI_NewID = __UI_NewControl(__UI_Type_Button, "CancelBT", 80, 23, 362, 255, __UI_GetID("OpenFrame")) __UI_NewID = __UI_NewControl(__UI_Type_Button, "CancelBT", 80, 23, 362, 255, __UI_GetID("OpenFrame"))
SetCaption "CancelBT", "&Cancel" SetCaption __UI_NewID, "&Cancel"
Control(__UI_NewID).CanHaveFocus = True Control(__UI_NewID).CanHaveFocus = True
__UI_NewID = __UI_NewControl(__UI_Type_CheckBox, "ShowOnlyFrmbinFilesCB", 200, 23, 25, 255, __UI_GetID("OpenFrame")) __UI_NewID = __UI_NewControl(__UI_Type_CheckBox, "ShowOnlyFrmbinFilesCB", 200, 23, 25, 255, __UI_GetID("OpenFrame"))
SetCaption "ShowOnlyFrmbinFilesCB", "Show only .frmbin files" SetCaption __UI_NewID, "Show only .frmbin files"
Control(__UI_NewID).Value = -1 Control(__UI_NewID).Value = -1
Control(__UI_NewID).CanHaveFocus = True Control(__UI_NewID).CanHaveFocus = True
Control(__UI_NewID).BackStyle = __UI_Transparent Control(__UI_NewID).BackStyle = __UI_Transparent
@ -357,7 +356,7 @@ SUB __UI_LoadForm
'Z-Ordering dialog: 'Z-Ordering dialog:
'---------------------------------- '----------------------------------
__UI_NewID = __UI_NewControl(__UI_Type_Frame, "ZOrdering", 463, 289, -600, -500, 0) __UI_NewID = __UI_NewControl(__UI_Type_Frame, "ZOrdering", 463, 289, -600, -500, 0)
SetCaption "ZOrdering", "Z-Ordering" SetCaption __UI_NewID, "Z-Ordering"
Control(__UI_NewID).HasBorder = True Control(__UI_NewID).HasBorder = True
Control(__UI_NewID).BackColor = Darken(__UI_DefaultColor(__UI_Type_Form, 2), 105) Control(__UI_NewID).BackColor = Darken(__UI_DefaultColor(__UI_Type_Form, 2), 105)
@ -367,15 +366,15 @@ SUB __UI_LoadForm
Control(__UI_NewID).Font = SetFont("cour.ttf", 12, "monospace") Control(__UI_NewID).Font = SetFont("cour.ttf", 12, "monospace")
__UI_NewID = __UI_NewControl(__UI_Type_Button, "UpBT", 40, 42, 413, 84, __UI_GetID("ZOrdering")) __UI_NewID = __UI_NewControl(__UI_Type_Button, "UpBT", 40, 42, 413, 84, __UI_GetID("ZOrdering"))
SetCaption "UpBT", "^" SetCaption __UI_NewID, "^"
Control(__UI_NewID).Disabled = True Control(__UI_NewID).Disabled = True
__UI_NewID = __UI_NewControl(__UI_Type_Button, "DownBT", 40, 42, 413, 146, __UI_GetID("ZOrdering")) __UI_NewID = __UI_NewControl(__UI_Type_Button, "DownBT", 40, 42, 413, 146, __UI_GetID("ZOrdering"))
SetCaption "DownBT", "v" SetCaption __UI_NewID, "v"
Control(__UI_NewID).Disabled = True Control(__UI_NewID).Disabled = True
__UI_NewID = __UI_NewControl(__UI_Type_Button, "CloseZOrderingBT", 80, 23, 192, 255, __UI_GetID("ZOrdering")) __UI_NewID = __UI_NewControl(__UI_Type_Button, "CloseZOrderingBT", 80, 23, 192, 255, __UI_GetID("ZOrdering"))
SetCaption "CloseZOrderingBT", "&Close" SetCaption __UI_NewID, "&Close"
Control(__UI_NewID).CanHaveFocus = True Control(__UI_NewID).CanHaveFocus = True
END SUB END SUB

View file

@ -183,13 +183,13 @@ SUB __UI_BeforeUpdateDisplay
SELECT CASE TempValue SELECT CASE TempValue
CASE __UI_Type_Button CASE __UI_Type_Button
TempValue = __UI_NewControl(__UI_Type_Button, "", 80, 23, TempWidth \ 2 - 40, TempHeight \ 2 - 12, ThisContainer) TempValue = __UI_NewControl(__UI_Type_Button, "", 80, 23, TempWidth \ 2 - 40, TempHeight \ 2 - 12, ThisContainer)
SetCaption Control(TempValue).Name, RTRIM$(Control(TempValue).Name) SetCaption TempValue, RTRIM$(Control(TempValue).Name)
CASE __UI_Type_Label, __UI_Type_CheckBox, __UI_Type_RadioButton CASE __UI_Type_Label, __UI_Type_CheckBox, __UI_Type_RadioButton
TempValue = __UI_NewControl(TempValue, "", 150, 23, TempWidth \ 2 - 75, TempHeight \ 2 - 12, ThisContainer) TempValue = __UI_NewControl(TempValue, "", 150, 23, TempWidth \ 2 - 75, TempHeight \ 2 - 12, ThisContainer)
SetCaption Control(TempValue).Name, RTRIM$(Control(TempValue).Name) SetCaption TempValue, RTRIM$(Control(TempValue).Name)
CASE __UI_Type_TextBox CASE __UI_Type_TextBox
TempValue = __UI_NewControl(__UI_Type_TextBox, "", 120, 23, TempWidth \ 2 - 60, TempHeight \ 2 - 12, ThisContainer) TempValue = __UI_NewControl(__UI_Type_TextBox, "", 120, 23, TempWidth \ 2 - 60, TempHeight \ 2 - 12, ThisContainer)
SetCaption Control(TempValue).Name, RTRIM$(Control(TempValue).Name) SetCaption TempValue, RTRIM$(Control(TempValue).Name)
CASE __UI_Type_ListBox CASE __UI_Type_ListBox
TempValue = __UI_NewControl(__UI_Type_ListBox, "", 200, 200, TempWidth \ 2 - 100, TempHeight \ 2 - 100, ThisContainer) TempValue = __UI_NewControl(__UI_Type_ListBox, "", 200, 200, TempWidth \ 2 - 100, TempHeight \ 2 - 100, ThisContainer)
Control(TempValue).HasBorder = True Control(TempValue).HasBorder = True
@ -203,7 +203,7 @@ SUB __UI_BeforeUpdateDisplay
TempValue = __UI_NewControl(TempValue, "", 230, 150, TempWidth \ 2 - 115, TempHeight \ 2 - 75, ThisContainer) TempValue = __UI_NewControl(TempValue, "", 230, 150, TempWidth \ 2 - 115, TempHeight \ 2 - 75, ThisContainer)
CASE __UI_Type_Frame CASE __UI_Type_Frame
TempValue = __UI_NewControl(TempValue, "", 230, 150, TempWidth \ 2 - 115, TempHeight \ 2 - 75, 0) TempValue = __UI_NewControl(TempValue, "", 230, 150, TempWidth \ 2 - 115, TempHeight \ 2 - 75, 0)
SetCaption Control(TempValue).Name, RTRIM$(Control(TempValue).Name) SetCaption TempValue, RTRIM$(Control(TempValue).Name)
CASE __UI_Type_MenuBar CASE __UI_Type_MenuBar
'Before adding a menu bar item, reset all other menu bar items' alignment 'Before adding a menu bar item, reset all other menu bar items' alignment
FOR i = 1 TO UBOUND(Control) FOR i = 1 TO UBOUND(Control)
@ -212,13 +212,13 @@ SUB __UI_BeforeUpdateDisplay
END IF END IF
NEXT NEXT
TempValue = __UI_NewControl(TempValue, "", 0, 0, 0, 0, 0) TempValue = __UI_NewControl(TempValue, "", 0, 0, 0, 0, 0)
SetCaption Control(TempValue).Name, RTRIM$(Control(TempValue).Name) SetCaption TempValue, RTRIM$(Control(TempValue).Name)
__UI_RefreshMenuBar __UI_RefreshMenuBar
__UI_ActivateMenu Control(TempValue), False __UI_ActivateMenu Control(TempValue), False
CASE __UI_Type_MenuItem CASE __UI_Type_MenuItem
IF __UI_ActiveMenu > 0 AND LEFT$(Control(__UI_ParentMenu).Name, 5) <> "__UI_" THEN IF __UI_ActiveMenu > 0 AND LEFT$(Control(__UI_ParentMenu).Name, 5) <> "__UI_" THEN
TempValue = __UI_NewControl(TempValue, "", 0, 0, 0, 0, __UI_ParentMenu) TempValue = __UI_NewControl(TempValue, "", 0, 0, 0, 0, __UI_ParentMenu)
SetCaption Control(TempValue).Name, RTRIM$(Control(TempValue).Name) SetCaption TempValue, RTRIM$(Control(TempValue).Name)
__UI_ActivateMenu Control(__UI_ParentMenu), False __UI_ActivateMenu Control(__UI_ParentMenu), False
END IF END IF
END SELECT END SELECT
@ -306,7 +306,7 @@ SUB __UI_BeforeUpdateDisplay
DIM TotalReplacements AS LONG DIM TotalReplacements AS LONG
b$ = Replace(b$, "\n", CHR$(10), False, TotalReplacements) b$ = Replace(b$, "\n", CHR$(10), False, TotalReplacements)
END IF END IF
SetCaption RTRIM$(Control(i).Name), b$ SetCaption i, b$
IF LEN(b$) > 0 AND b$ <> "&" THEN GOSUB AutoName IF LEN(b$) > 0 AND b$ <> "&" THEN GOSUB AutoName
IF Control(i).Type = __UI_Type_MenuItem THEN IF Control(i).Type = __UI_Type_MenuItem THEN
__UI_ActivateMenu Control(Control(i).ParentID), False __UI_ActivateMenu Control(Control(i).ParentID), False
@ -911,7 +911,7 @@ SUB LoadPreview
b$ = SPACE$(4): GET #BinaryFileNum, , b$ b$ = SPACE$(4): GET #BinaryFileNum, , b$
b$ = SPACE$(CVL(b$)) b$ = SPACE$(CVL(b$))
GET #BinaryFileNum, , b$ GET #BinaryFileNum, , b$
SetCaption RTRIM$(Control(TempValue).Name), b$ SetCaption TempValue, b$
IF LogFileLoad THEN PRINT #LogFileNum, "CAPTION:" + Caption(TempValue) IF LogFileLoad THEN PRINT #LogFileNum, "CAPTION:" + Caption(TempValue)
CASE -3 'Text CASE -3 'Text
b$ = SPACE$(4): GET #BinaryFileNum, , b$ b$ = SPACE$(4): GET #BinaryFileNum, , b$

Binary file not shown.

Binary file not shown.