All Activity
This stream auto-updates
- Yesterday
-
Is it possible to implement floating/fully custom Dropdown Menus?
Attila Kovacs replied to araujoarthur's topic in VCL
if you are already using StyleControls look for the TscStyledForm component and "dropdownforms" demo and set your form shape with "SetWindowRgn" -
For the record, TurboPower was a good company, but their components were commercial. They were open-sourced their products when the company shut-down their component business. However, they are products of the previous century and they show it. And incidentally, TurboPower was owned by a gambling business (a Casino or something).
-
Is it possible to implement floating/fully custom Dropdown Menus?
Anders Melander replied to araujoarthur's topic in VCL
It took me a good while to spot the difference between the two screenshots but I get your meaning. AFAIK it's possible to control DevExpress' skinning of standard VCL controls to some degree. See TdxSkinController.OnSkinControl The dependencies though 😕 -
Is it possible to implement floating/fully custom Dropdown Menus?
pyscripter replied to araujoarthur's topic in VCL
Following on @Anders Melander suggestion you can find here a free implementation of his idea. The library also supports controls on menus and toolbars, is Vcl styles compatible and High-DPI aware. See some of the images here. -
No, never did, then other priorities took over and I forgot about it. Sorry.
-
Is it possible to implement floating/fully custom Dropdown Menus?
araujoarthur replied to araujoarthur's topic in VCL
Hey thanks for the response 🙂 I have DevExpress available. What has been holding me to use it is the issues Skins bring. I'm using StyleControls to design the UI elements (custom titlebar, side menu, status bar, content area), I use some PopupMenus too and the mere presence of any DX control on the form causes the TPopupMenu drawing to look flat and old (which ofc is not the focus of the application). I would totally jump into TdxCalloutPopup if I knew a way to totally disable DX Skins from intefering/side effects. Here are an example of how it looks like before any DX component is in place: and this is how it looks like after dropping any DX component This example displays a very boring behavior that is not a major issue, but also raises alert to what other kinds of side effects I could have and don't know how to or that I have to deal with them. -
Is it possible to implement floating/fully custom Dropdown Menus?
Anders Melander replied to araujoarthur's topic in VCL
The easiest way is probably to just use a TForm as the poup. You need to: Display the form with ShowWindow(SW_SHOWNA). Handle WM_NCACTIVATE to avoid the form activating when clicked. In CreateParams: Set Params.WndParent to the parent form. Add WS_POPUP and WS_CLIPCHILDREN to Params.Style and exclude WS_CHILD. Add WS_EX_TOPMOST and WS_EX_TOOLWINDOW to Params.ExStyle. If you will be implementing the form shape with alpha blending then you also need to add WS_EX_LAYERED. Shape the form either with alpha blending (WS_EX_LAYERED and SetLayeredWindowAttributes) or with regions (I can't remember the APIs for that OTOH). I'm sure that if you search github for the above (with lang:pascal) that you can find some Delphi examples. See also: http://melander.dk/articles/alphasplash/ ...or you could just throw some $$$ at DevExpress and use their TdxCalloutPopup control: -
My alternate option is to use a browser view and embed an implementation of this https://javascript.daypilot.org/demo/month/
-
I'm organizing a group trip to Delphi Summit!!!
GabrielMoraru replied to Moskw@'s topic in Tips / Blogs / Tutorials / Videos
Hi Marci, Next year I might come with you. We talk next year in April... 🙂 -
Is it possible to implement floating/fully custom Dropdown Menus?
araujoarthur posted a topic in VCL
Hello! I'm building an user interface in VCL (and I currently have as a prerequisite that it's built in VCL. In the upcoming phases I'll probably build it also in FMX to support gpu accelerated rendering). At the current point I need to approach the user menu as shown in the project picture, but I'm not really sure it's even possible (in VCL or even plain WinAPI). I don't really mind if I have to custom draw it, create a fully new component or use a composition (like a form). The requisites are that it spawns below the username button, lives as long as it or any of its items are hovered or for T seconds after showing if not hovered. Opening animations are a bonus, not required but very cool. The menu items are required to react to the hovering individually (have the states Rest, Hot, Pressed and Disabled). So is there any way to approach this and fulfill these requirements? -
Did you ever complete this? I actually have a need for a component like this
-
btt joined the community
-
On my FMXLinux app it works as expected Ubuntu 22.04 (under Parallels on MAC) procedure fill_printer_dropdown; var x: Integer; i: Integer; s: string; begin x := Printer.count; for i := 0 to x - 1 do begin s := Printer.Printers[i].Device; mainform.PrinterDropdown.Items.Add(s); end; end;
-
File operations over shared folder
Angus Robertson replied to Squall_FF8's topic in Network, Cloud and Web
You use the Windows API WNetAddConnection2 to make a connection to a network resource and can redirect a local device to the network resource, ie map a UNC drive to a local drive letter that you can access, the API needs the remote login. The ICS TIcsFileCopy component uses it for remote path access. Angus -
File operations over shared folder
Remy Lebeau replied to Squall_FF8's topic in Network, Cloud and Web
Try using WNetAddConnection2() or WNetAddConnection3() to establish a connection to the folder with user/pass before then accessing the files. -
Even with SEQUENCE you need a trigger in Firebird. It was mainly a name change in Firebird 3. As of Firebird 4 there is also an auto increment option (IDENTITY). (Because I still support some 2.5 DB's I do still sometimes use GENERATORs.)
-
Hey guys, I have a shared folder on the local net that I want to be able to Copy/Move/Delete files from it with a Delphi application. It works great when I share that folder with unlimited access. For security requirements I cant do that - I need to make it accessible only with user/pass Do you know how I can that?
-
If I remember correctly, the whole concept/interface with Post, Edit, EoF, First, Next,... was created for BDE, but was so loved/easy to use by developers that its functionality was replicated in general and every new DBset specific for specific DB (DAC, FireDAC, I even had components for Postgre and Oracle implementing those). It doesn matter for the thread, but for general DB perspective, MSSQL as a spiritual successor of Access, comes natively packed with auto-inc. So you dont need triggers for that. Later versions added Sequence (I guess influenced by Oracle ). Even IBX adopted Sequence, which if used makes Generators a little obsolete.
-
Share a data between two units in dynamic loaded BPL.
Pat Foley replied to CRO_Tomislav's topic in VCL
You might to study and use this to move cursor to control being selected. I want to add it to IDE <F6> or <Ctrl>. function it only jumps to selection without any animation 🙂 procedure TTaskmaster.moveMouse(AtaskDetail: TInstruction); var x, y, MouseXError, MouseYError: integer; ControlCenter: Tpoint; AC: TControl; begin findControl(AtaskDetail, AC); if not assigned(AC) then exit; if assigned(AC.Parent) then AC.Parent.Show; AC.Show; x := AC.ClientOrigin.X + AC.width div 2; y := AC.ClientOrigin.y + AC.height div 2; begin MouseXError := round(1.12 *(x - mouse.CursorPos.X)); MouseYError := round(1.12 * (y - mouse.cursorPos.y)); // MouseXError := min(MouseXError, 10 * sign(MouseXError)); // MouseYError := min(MouseYError, 10 * sign(MouseYError)); controlCenter.X := mouse.CursorPos.x + MouseXError; controlCenter.Y := Mouse.CursorPos.y + mouseYError; mouse.CursorPos := ControlCenter; end; repeatTask := (abs(MouseXError) > 7) or (abs(MouseYError) > 7); end; -
Share a data between two units in dynamic loaded BPL.
CRO_Tomislav replied to CRO_Tomislav's topic in VCL
THX -
Share a data between two units in dynamic loaded BPL.
Pat Foley replied to CRO_Tomislav's topic in VCL
This should yield control asked for. procedure TTaskMaster.findControl(AtaskDetail: TInstruction; var AC: TControl); var ff, ii : integer; sForm, sControl: string; begin with AtaskDetail do begin if Control <> nil then AC := Control else begin sForm := controlForm + ' not found.'; sControl := controlName + ' not found.'; //screens move about on windows list top window usually 0 :( for ff := 0 to Screen.FormCount - 1 do if Screen.Forms[ff].name = controlform then begin sform := controlForm; with Screen.Forms[ff] do begin for ii := 0 to componentcount - 1 do if Components[ii].Name = ControlName then begin sControl := controlName + ' comps ' + ii.ToString; Control := Components[ii] as Tcontrol; //onBS(False, format('Item %d Found %s',[ii,controlName])); break; end //else//if name //run := false; // onBS(False, format('Item %d not found %s',[ii, controlName])); end;// with screen forms end; //if screen.forms onBS(False, sForm + ' ' + sControl); end;// else end;//with taskdetail end; What TInstruction is TInstruction = class //position in Db Atom: PAtom; Control: TControl; ControlForm: string; //3 ControlName: string; //2 Description: string;//6 //Nu: integer; //0 Kind: string; //1 was integer KindNU: integer; referenceValue: Double;//5 tagName: string; //4 tagValue: Double; //no data in table end; -
Share a data between two units in dynamic loaded BPL.
Lars Fosdal replied to CRO_Tomislav's topic in VCL
Isolate your business logic from the UI. Use an intermediate class to pass the data around. -
If you currently are a Delphi/RAD Studio subscriber, you can request access to the beta if you didn't already get an invite. As per the link in the starting post of this thread: Closing this thread.
-
That would need to be a discussion for the beta testers to have in private.
-
Share a data between two units in dynamic loaded BPL.
CRO_Tomislav replied to CRO_Tomislav's topic in VCL
XML is not a problem, Accessing to Quer1 on MDI Form1 is a problem... Can You provide me an example for Application.Screen to access a Query1 on a MDI form Form1? -
Share a data between two units in dynamic loaded BPL.
Pat Foley replied to CRO_Tomislav's topic in VCL
One thing about XML is on a treeview each node needs a unique caption so as tabSheets or the parent of control wanted are added a number is added to the node's caption as the forms are added. Second thing is the Control could have data reference added. type // On the UI controls side carry some data references for convenience // the data side could use Dependance Injection to tie in UI controls TDataButton = class(TButton) Form: TControl; Strs: TStrings; end; What's neat about MDI you can create a new childform inside a begin..end. To access the form elsewhere use Application.Screen