Jump to content
uniGUI Discussion Forums

Search the Community

Showing results for tags 'UniEdit'.

More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


  • uniGUI Public
    • Announcements
    • General
    • Feature Requests
    • Installation
    • Deployment
    • Other Platforms
  • Licensing
    • Licensing
    • Ordering uniGUI
  • Bug Reports
    • Active Reports
    • Closed Reports
    • Old Bug Reports
  • uniGUI Development
    • uniGUI 1.x
    • Beta Releases
    • Utilities
  • Mobile Platform
    • uniGUI Mobile
    • Mobile Browsers
  • Users Area
    • Sample Projects
    • Components and Code Samples
  • Non-English
    • Non-English
  • Miscellaneous
    • Hosting
    • Server Security
    • Jobs

Find results in...

Find results that contain...

Date Created

  • Start


Last Updated

  • Start


Filter by number of...


  • Start





Website URL







Found 6 results

  1. How do I let UnimNumberEdit allow me to put a '0' on the left? For example: I have two situations. 1st Situation: I need to put in a field the prefix of the phone 069, but when I leave the field it is only 69. 2nd Situation: I have a vehicle registration, and in this register I inform him of his license as follows. In a UniEdit I inform the letters of the board: NBH and in a field UnimNumberEdit I must inform the numbers of the board: 0985, but when I leave the field UnimNumberEdit automatically it converts to 985. The final result should be NBH-0985, but it's getting NBH-985. So I need the UnimNumberEdit field to accept 0 on the left. Is there any way to do this?
  2. Alessandro

    Transform uniDBEdit to upperCase

    Hello, Throughout my project, Edits and DBEdits have the property CHARCASE as ecNORMAL. It has some form, command or script to activate at once, throughout the project, so that the Edits are UpperCase, LowerCase or Normal (at runtime). Thank you
  3. robertowutke

    UniEdit não mostra o text correto

    Fala galera firme?? tava com meu projeto funcionando de boas... de repente do nada começou falhar o logon do usuário. Nesse caso descobri que o unigui não está recebendo o Text no UniEdit corretamente.... não sei mais o que fazer, tentei de tudo ja.... basicamente o que faço é.... deixar o edit com propriedade text preenchida aleatoreamente "roberto", executo o programa e no button eu coloco um showmessage do Uniedit1.text quando clico sem alterar o text.. ele vai mostrar roberto corretamente, mas se vc apagar o text e escrever qualquer coisa, ele vai continuar mostrando 'roberto' do mesmo jeito.... não consigo resolver de jeito nhm.... se alguem puder me ajudar fico mt grato!!!!
  4. Hi! This is a masked input plugin for the jQuery javascript library. (Hayri Aslan more professionally implemented this feature: http://forums.unigui.com/index.php?/topic/4475-uniexclusive/) Source and usage: http://digitalbush.com/projects/masked-input-plugin/ Demo: http://digitalbush.com/projects/masked-input-plugin/#demo Simple example of use (eg with component UniEdit): 1. It is necessary to download the two files and include in your project 1. jquery 2. jquery.maskedinput.min.js 2. 1. UniEdit1.Text := ''; 2. UniEdit1 -> ClientEvents -> UniEvents -> add function beforeInit: function beforeInit(sender) { Ext.onReady( function () { $("#"+sender.id+"-inputEl").mask("99/99/9999"); }); } Best regards.
  5. Uses CLIPBrd.... Select the text UniEdit and click the right mouse button and run context menu . procedure TMainForm.CommentEditMouseDown(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer); begin if Button=mbRight then UniPopupMenu1.Popup(828+X,Height+18+Y); end; When I want to copy the selected uniedit text. procedure TMainForm.N1Click(Sender: TObject); begin Clipboard.Clear; Clipboard.AsText:=CommentEdit.Text; end; After right-clicking the selection text disappears.
  6. erdal

    uniedit Self.SelStart

    how to use command uniedit---> Self.SelStart := Length(Self.Text); Self.SelLength := 0; And method change not found class list. procedure Change; override; problem - 1 Complete unit: //----------------------------------- Autocomplete edit-------------------------------------------------// unit AutocompleteEdit; interface uses Windows , Classes , Vcl.StdCtrls , SysUtils , StrUtils , Messages ,uniEdit ,uniGUIBaseClasses ,uniGUIClasses; const MSG_HIDEWORDLIST = WM_USER + 222; type TAutocompleteEdit=class(Tuniedit) private FWordList: TListBox; FCaretPos: Integer; FWordListHeight: Integer; FWordListWidth: Integer; procedure HandleWordListLostFocus(ASender: TObject); procedure HandleWordListSelectItem(ASender: TObject); procedure HandleWordListKeyPress(Sender: TObject; var Key: Char); procedure HandleWordListKeyDown(ASender: TObject; var Key: Word; Shift: TShiftState); procedure HandleHideWordList(var AMsg); overload; message MSG_HIDEWORDLIST; procedure HandleHideWordList; overload; procedure SetWordListHeight(const Value: Integer); procedure SetWordListWidth(const Value: Integer); procedure RegainFocus; protected procedure ShowWordList(AWords: TStrings); procedure HideWordList; procedure Change; override; procedure KeyDown(var Key: Word; Shift: TShiftState); override; procedure DoExit; override; public constructor Create(AOwner: TComponent); override; published property WordListHeight: Integer read FWordListHeight write SetWordListHeight; property WordListWidth: Integer read FWordListWidth write SetWordListWidth; end; TAutocompleteMan=class private FWords: TStrings; public constructor Create; destructor Destroy; override; function IsRecognized(AWord: string): Boolean; overload; function IsRecognized(AWord: string; AWordList: TStrings): Boolean; overload; procedure LoadFromFile(const AFilename: string); procedure AddWord(const AWord: string); property Words: TStrings read FWords; end; procedure Register; var AutocompleteMan: TAutocompleteMan; implementation procedure Register; begin RegisterComponents('CodeCall', [TAutocompleteEdit]); end; { TAutocompleteMan } procedure TAutocompleteMan.AddWord(const AWord: string); begin FWords.Add(UpperCase(AWord) + '=' + AWord); end; constructor TAutocompleteMan.Create; begin FWords := TStringList.Create; TStringList(FWords).Duplicates := dupIgnore; end; destructor TAutocompleteMan.Destroy; begin FWords.Free; inherited; end; function TAutocompleteMan.IsRecognized(AWord: string): Boolean; var i: Integer; begin Result := False; AWord := UpperCase(AWord); for i := 0 to FWords.Count-1 do begin Result := System.Pos(AWord, FWords.Names) > 0; if Result then Break; end; end; function TAutocompleteMan.IsRecognized(AWord: string; AWordList: TStrings): Boolean; var i: Integer; begin Result := False; AWord := UpperCase(AWord); AWordList.Clear; for i := 0 to FWords.Count-1 do begin if System.Pos(AWord, FWords.Names) > 0 then begin Result := True; AWordList.Add(FWords.ValueFromIndex); end; end; end; procedure TAutocompleteMan.LoadFromFile(const AFilename: string); var i: Integer; F: TStrings; begin F := TStringList.Create; try F.LoadFromFile(AFilename); for i := 0 to F.Count-1 do AddWord(F); finally F.Free; end; end; { TAutocompleteEdit } procedure TAutocompleteEdit.Change; var S: TStrings; begin inherited; if AutocompleteMan.IsRecognized(Self.Text) then begin S := TStringList.Create; try if AutocompleteMan.IsRecognized(Self.Text, S) then ShowWordList(S); finally S.Free; end; end else HideWordList; end; procedure TAutocompleteEdit.HandleHideWordList(var AMsg); begin HandleHideWordList; end; constructor TAutocompleteEdit.Create(AOwner: TComponent); begin inherited; FWordListHeight := 60; end; procedure TAutocompleteEdit.DoExit; begin if Assigned(FWordList) and FWordList.Visible and not FWordList.Focused then HideWordList; inherited; end; procedure TAutocompleteEdit.HandleHideWordList; begin FWordList.Free; FWordList := nil; end; procedure TAutocompleteEdit.HandleWordListKeyDown(ASender: TObject; var Key: Word; Shift: TShiftState); begin if (Key=VK_UP) and (FWordList.ItemIndex=0) then RegainFocus; end; procedure TAutocompleteEdit.HandleWordListKeyPress(Sender: TObject; var Key: Char); begin case Key of #13: begin Key := #0; Self.Text := FWordList.Items[FWordList.ItemIndex]; Self.SetFocus; Self.SelStart := Length(Self.Text); Self.SelLength := 0; HideWordList; end; #27: begin RegainFocus; HideWordList; end; else begin RegainFocus; end; end; end; procedure TAutocompleteEdit.HandleWordListLostFocus(ASender: TObject); begin if not Self.Focused then HideWordList; end; procedure TAutocompleteEdit.HandleWordListSelectItem(ASender: TObject); begin Self.Text := FWordList.Items[FWordList.ItemIndex]; HideWordList; end; procedure TAutocompleteEdit.HideWordList; begin PostMessage(Self.Handle, MSG_HIDEWORDLIST, 0, 0); end; procedure TAutocompleteEdit.KeyDown(var Key: Word; Shift: TShiftState); begin if Key=VK_ESCAPE then HideWordList else if (Key=VK_DOWN) and Assigned(FWordList) and FWordList.Visible then begin FCaretPos := Self.SelStart; FWordList.SetFocus; if FWordList.ItemIndex < 0 then FWordList.ItemIndex := 0; end else inherited; end; procedure TAutocompleteEdit.RegainFocus; begin Self.SetFocus; Self.SelStart := FCaretPos; Self.SelLength := 0; end; procedure TAutocompleteEdit.SetWordListHeight(const Value: Integer); begin if FWordListHeight <> Value then begin FWordListHeight := Value; if Assigned(FWordList) then FWordList.Height := FWordListHeight; end; end; procedure TAutocompleteEdit.SetWordListWidth(const Value: Integer); begin if FWordListWidth <> Value then begin FWordListWidth := Value; if Assigned(FWordList) then begin if FWordListWidth < 1 then FWordList.Width := Self.Width else FWordList.Width := FWordListWidth; end; end; end; procedure TAutocompleteEdit.ShowWordList(AWords: TStrings); begin if FWordList=nil then begin FWordList := TListBox.Create(Self); FWordList.ParentCtl3D := False; FWordList.Ctl3D := False; FWordList.Parent := Self.Parent; FWordList.TabStop := False; FWordList.OnExit := HandleWordListLostFocus; FWordList.OnKeyPress := HandleWordListKeyPress; FWordList.OnKeyDown := HandleWordListKeyDown; end; FWordList.Items.Assign(AWords); if FWordListWidth < 1 then FWordList.SetBounds(Self.Left, Self.Top + Self.Height, Self.Width, FWordListHeight) else FWordList.SetBounds(Self.Left, Self.Top + Self.Height, FWordListWidth, FWordListHeight); FWordList.Show; end; initialization AutocompleteMan := TAutocompleteMan.Create; finalization AutocompleteMan.Free; end.