Jump to content

Pat Foley

Members
  • Content Count

    359
  • Joined

  • Last visited

  • Days Won

    2

Pat Foley last won the day on August 9 2023

Pat Foley had the most liked content!

Community Reputation

47 Excellent

1 Follower

Technical Information

  • Delphi-Version
    Delphi 12 Athens

Recent Profile Visitors

3404 profile views
  1. Pat Foley

    Viewing All the Digits of Pi in Real Time with Delphi

    In you missed it Two Pie day or Tau June 28 is coming! https://tauday.com/tau-manifesto Article about using Tau in schools.
  2. Pat Foley

    Hunting a unit reference

    Why not put a break point in it and use the call stack to see who needs it since you found the unit. Or comment out half the enums or settings in it. If it's only a dcu--view in a text editor. The graph tool does have a build order output that could in help placing a breakpoint when compiling when unit is renamed.
  3. Pat Foley

    Toolbar + ToolButton + TitleBar flicking

    Style sludge and shadow it's hard to know which window is showmodal. I like to move the cursor to control being surfaced to help end user know which window has focus. Windows is flashing the active window though the smoke to alert you pushing buttons on inactive window.
  4. Pat Foley

    BringToFront alternative

    I don't want to change anything about other controls, I just need a control to be on top of all others. Here's putting the label on a tabsheet. This allows giving a context to incoming label. By using tabsheets in the IDE you can group controls readily Then show only what is needed in runtime. var ts: TTabsheet; var labelNu: Integer = 1; procedure TForm1.AddLabelwithTabbedIndexClick(Sender: TObject); begin ts:= TTabsheet.Create(Self); ts.PageControl := PageControl1; ts.Caption := LabelNu.ToString; var llabel := TLabel.Create(Self); //was TStaticText llabel.Name := 'llabel' + LabelNu.ToString; lLabel.Caption := 'label&' + LabelNu.ToString; lLabel.Parent := ts; //LLabel.TabStop := True; ts.TabVisible := True; Inc(labelNu); end; procedure TForm1.RandomShowHideTabClick(Sender: TObject); begin ts := PageControl1.Pages[Random(PageControl1.PageCount)]; with ts do TabVisible := not tabVisible; end; procedure TForm1.Showllabel1Click(Sender: TObject); begin var lbl := FindComponent('llabel1'); (lbl as TControl).show; end;
  5. Pat Foley

    BringToFront alternative

    You could hide the pagecontrol to show the label parented to the form or change the label parent to control on top. I would use a Tpanel set to top align that "pushes" the Tabsheet/pagecontrol down to mimic the banners used in MS's XL when showing.
  6. To find what is not connected, use the debugger. Switch from the form view ~design tab to the code view and insert a breakpoint on a line that has a blue dot on it in left gutter. Using F5 will cover the blue with red dot if the project is in debug mode selected in manager. Test the Button click it should halt program at the program line selected. Test the DrawGrid ondraw event next. If the program doesn't break at the breakpoint, inspect if the Drawgrid1 event ondraw is assigned using the object inspector Events tag.
  7. Pat Foley

    What's the general opinion on v12?

    Observations 12 Patch vs 11.3 12 eats inifile lines commented out using ; Unsure if the IDE or program made is doing it. 12 IDE editor tabs get resized just like GEx tabs when hot switching from 4K to low resolution. Suggesting that Style needs applied for high DPI to work. An executable with style seems to "right" size readily:)
  8. Pat Foley

    Delphi and "Use only memory safe languages"

    Just a shake down by the government. Consider the Tik-Tok uproar last year. The Tik-Tok lobbyists silenced the talk by talking to the complainers and voila Tik-Tok is good. If you want your stuff used get a good lobbyist!
  9. Why not do it yourself. First build arduino project with openwire. https://blogs.embarcadero.com/control-and-communicate-with-arduino-device-in-this-innovative-software-built-in-delphi/ Then should be able to implement a project with your device and desired features.
  10. Pat Foley

    A native VCL, and not Windows-based, TComboBox control.

    Here is a sample of runtime created controls that use same string. Plus assigns event handler. const InputPLC256 = 'x0,x1,x32,pin64,pin128,pin255,None'; procedure TForm1.Button4Click(Sender: TObject); begin for var I := 1 to 100 do begin var P := TPanel.Create(Self); with P do begin Name := 'TagInputEdit_' + I.ToString; SetBounds(280 - 5, 17 + I * 34, 204, 30); Parent := Self; Caption := ''; end; var L := TLabel.Create(Self); with L do begin SetBounds(80, 6, 64, 22); Parent := P; end; var CB := TComboBox.Create(Self); with CB do begin SetBounds(5, 3, 65, 22); Parent := P; Show; onchange := TagUpdater; Tag := NativeInt(L); items.CommaText := InputPLC256;//memo1.Lines; Text := Items[Random(items.Count)-1]; L.Caption := Text; end; end; end; procedure TForm1.TagUpdater(Sender: Tobject); begin var S := Sender as TComboBox; var L := TLabel(S.Tag); var N := S.Parent.Name; L.Caption := Format('%s %s', [N, S.Text]); end;
  11. Pat Foley

    Is it possible to stream my phone to my laptop?

    Use a usb cord to connect to laptop and try some of the demos of fmx 🙂
  12. Pat Foley

    How do I tab into a TDBRadioGroup ?

    Try setting the TabStop property of Radiogroup to True when none of the controls are selected. In the RadioGroups.OnEnter set focus on a control so keys can change the selection as needed. //Need RG .TabStop prop set to True to 'focus' the groupbox when its control index //is -1; procedure TformInstructorStation.RadioGroup2Enter(Sender: TObject); begin with Sender as TRadioGroup do if ItemIndex = -1 then TRadioButton(Controls[0]).SetFocus; //(Sender as TRadioGroup).OnEnter := nil; end;
  13. Pat Foley

    Extend Standard VCL

    How about a collection of check boxes TCheckListBox The sample simply clears the checkboxes that were in the IDE and adds the ones that are in Array<string> To extend you would change the Panel and Tstrings that the UI uses update the backend. Here the back end simply updates the UI when programs are used. It uses a Ddd pattern Data driven pattern. " Update the data early and often" class function TptrApps.HookInUI(inSG: TStringGrid; inLog: TStrings; inChBxs: TcheckListBox; inBanner: TPanel): TptrApps; begin Result := nil; focusedApp := @cacheApp; var R := TptrApps.Create; R.ChBxs := inChBxs; R.ChBxs.OnClick := R.changeExesList; R.ChBxs.Items.Clear; for var I := Low(goodApps) to High(goodApps) do begin R.ChBxs.Items.add(goodApps[I]); R.ChBxs.Checked[I] := True; ... const selfClass = 'FrmPat'; GoodApps: Tarray<string> = [cEveryThing,'Shell_TrayWnd','Notepad', 'TAppBuilder', 'Window', 'Chrome_WidgetWin_1', 'Notepad++', selfClass, 'TfmPeInformation' ];
  14. Or like the minesweeper game. Test for "open water" or "good ice". A test returns the position in range with start and stop of range when found and could return the size of the "open water" when not found.
  15. Pat Foley

    Access multiple Outlook calendars

    https://answers.microsoft.com/en-us/outlook_com/forum/all/how-to-insert-attachment-to-recurring-meeting/a418db48-337c-4124-8364-ea1344a13dee The employee needs to share calendar so you can look at it.
×