From 50a82c7958b792343d68e8a47217ae1d6b0b312a Mon Sep 17 00:00:00 2001 From: FellippeHeitor Date: Tue, 20 Dec 2016 02:31:59 -0200 Subject: [PATCH] Make the cursor blink again in textboxes. Also: - Adjust PropertyValue control's width to show ok/no/wait indicators. --- InForm/UiEditor.bas | 3 +++ InForm/UiEditor.frm | 2 +- InForm/xp.uitheme | 7 +------ 3 files changed, 5 insertions(+), 7 deletions(-) diff --git a/InForm/UiEditor.bas b/InForm/UiEditor.bas index 929e18f..10755d0 100644 --- a/InForm/UiEditor.bas +++ b/InForm/UiEditor.bas @@ -658,6 +658,8 @@ SUB __UI_BeforeUpdateDisplay IF FirstSelected = 0 THEN FirstSelected = PreviewFormID IF __UI_Focus <> PropertyValueID THEN + Control(PropertyValueID).Width = 250 + SELECT CASE SelectedProperty CASE 1 'Name Text(PropertyValueID) = RTRIM$(PreviewControls(FirstSelected).Name) @@ -738,6 +740,7 @@ SUB __UI_BeforeUpdateDisplay CASE 14 'Padding IF Text(PropertyValueID) = LTRIM$(STR$(PreviewControls(FirstSelected).Padding)) THEN PropertyAccept = True END SELECT + Control(PropertyValueID).Width = 225 Control(PropertyUpdateStatusID).Hidden = False _DEST Control(PropertyUpdateStatusID).HelperCanvas CLS , _RGBA32(0, 0, 0, 0) diff --git a/InForm/UiEditor.frm b/InForm/UiEditor.frm index 50a5c0a..07c392a 100644 --- a/InForm/UiEditor.frm +++ b/InForm/UiEditor.frm @@ -179,7 +179,7 @@ SUB __UI_LoadForm Control(__UI_NewID).Max = 14 Control(__UI_NewID).CanHaveFocus = True - __UI_NewID = __UI_NewControl(__UI_Type_TextBox, "PropertyValue", 250, 23, 200, 20, __UI_GetID("PropertiesFrame")) + __UI_NewID = __UI_NewControl(__UI_Type_TextBox, "PropertyValue", 225, 23, 200, 20, __UI_GetID("PropertiesFrame")) Control(__UI_NewID).HasBorder = True Control(__UI_NewID).CanHaveFocus = True diff --git a/InForm/xp.uitheme b/InForm/xp.uitheme index 7cabd0b..86eaa47 100644 --- a/InForm/xp.uitheme +++ b/InForm/xp.uitheme @@ -703,10 +703,8 @@ SUB __UI_DrawTextBox (This AS __UI_ControlTYPE, ControlState, ss1 AS LONG, ss2 A IF TIMER - SetCursor# > .3 THEN SetCursor# = TIMER cursorBlink%% = NOT cursorBlink%% - ELSEIF TIMER - __UI_LastInputReceived < .1 THEN - SetCursor# = TIMER - cursorBlink%% = True END IF + IF cursorBlink%% THEN IF This.Cursor > UBOUND(__UI_ThisLineChars) THEN This.Cursor = UBOUND(__UI_ThisLineChars) This.VisibleCursor = CaptionIndent + __UI_ThisLineChars(This.Cursor) - This.InputViewStart @@ -738,9 +736,6 @@ SUB __UI_DrawTextBox (This AS __UI_ControlTYPE, ControlState, ss1 AS LONG, ss2 A IF TIMER - SetCursor# > .3 THEN SetCursor# = TIMER cursorBlink%% = NOT cursorBlink%% - ELSEIF TIMER - __UI_LastInputReceived < .1 THEN - SetCursor# = TIMER - cursorBlink%% = True END IF FOR ThisLine = This.FirstVisibleLine TO TotalLines