Welcome, Guest
Username: Password: Remember me
CodeTyphon Web Development Pas2JS, WASM, etc, discussions and problems
  • Page:
  • 1

TOPIC:

Proposed changes for Pas2JS controls 1 month 1 week ago #18653

  • Luca
  • Luca's Avatar Topic Author
  • Offline
  • New Member
  • New Member
  • Posts: 1
  • Thank you received: 0
Over the last 3 months I've started using Pas2JS for a "Pas2JS GUI Web Browser Application". I found some elements that make it unfriendly in some situations. Here is a list of the changes that I think are necessary for correct behavior

// ***** js.pas *****
class TJSDataView
   function getBigInt64(aByteOffset : NativeInt; aLittleEndian : Boolean) : String;  // added 

File Attachment:

File Name: Modified_files.zip
File Size:115 KB



// ***** sysutils.pas *****
Changes in functions
   function UpperCase(const s: String): String; assembler;
   function LowerCase(const s: String): String; assembler;
Added a check on the string variable



// ***** controls.pas *****
class TControl
   function GetHeight: NativeInt; virtual;  // added
   
   procedure Changed; virtual; // modified to clear font style and background color
   procedure SetVisible(AValue: boolean); virtual; // Changed from private to protected and set as virtual


// ***** stdcontrls.pas *****
class TCustomComboBox
    function GetHeight: NativeInt; override;  // added
    function GetWidth: NativeInt; override;  // added
    function RealGetText: string; override;  // modified
    property ItemIndex: nativeint read GetItemIndex write SetItemIndex; // modified read property
    function GetItemIndex: nativeint; // added

class TCustomEdit
    function GetHeight: NativeInt; override; // modified
    function GetWidth: NativeInt; override;  // modified
    function RealGetText: string; override; // modified
    procedure RealSetText(const AValue: string); override; // modified
    procedure SetFocus; override; // modified


class TCustomCheckbox
    function GetHeight: NativeInt; override; // modified
    function GetWidth: NativeInt; override;  // modified

class TCustomLabel
    function GetHeight: NativeInt; override; // modified
    function GetWidth: NativeInt; override;  // modified

class TCustomButton
    procedure Changed; override;  // modified for CSS: font style removed if HandleClass or HandleId is not set


Preventing automatic export of background color in TControl changes the structure of dialog boxes. I solved this problem by adding a class to specify when you use MessageDlg and adding this class in a css file

.MsgDlg {
  color: #000 !important;
  background-color: #fff;
}

but I'm not sure it is a good solution.

 
Attachments:

Please Log in or Create an account to join the conversation.

Proposed changes for Pas2JS controls 1 month 1 week ago #18658

  • Sternas Stefanos
  • Sternas Stefanos's Avatar
  • Offline
  • Moderator
  • Moderator
  • Ex Pilot, M.Sc, Ph.D
  • Posts: 4538
  • Thank you received: 1116
Thanks Sir
We put and test your suggestions to LAB CT 8.60 (unreleased)
Please, give us time to test and report here.
PilotLogic Architect and Core Programmer

Please Log in or Create an account to join the conversation.

  • Page:
  • 1