nglthach
-
Content Count
11 -
Joined
-
Last visited
-
Days Won
1
Posts posted by nglthach
-
-
Thanks! It solved my problem!
-
Hi folks,
I am trying to skin menu item. I have successfully customize the menu item appearance. But if the menu has sub menu, I could not owner drawing the arrow. Here is my code:
procedure TForm12.cmniOpenRecentAdvancedDrawItem(Sender: TObject; ACanvas: TCanvas; ARect: TRect; State: TOwnerDrawState); begin // Prevent the OS drawing the arrow ExcludeClipRect(ACanvas.Handle, ARect.Left, ARect.Top, ARect.Right, ARect.Bottom); end; procedure TForm12.cmniOpenRecentDrawItem(Sender: TObject; ACanvas: TCanvas; ARect: TRect; Selected: Boolean); begin ACanvas.Brush.Style := bsSolid; ACanvas.Brush.Color := clRed; ACanvas.Rectangle(ARect); // Prevent the OS drawing the arrow ExcludeClipRect(ACanvas.Handle, ARect.Left, ARect.Top, ARect.Right, ARect.Bottom); end;
Here is the result:
As you see, the arrow still there although I already draw a rectangle to the whole menu item's rect.
Do you know how to prevent the OS drawing the arrow? Thanks!
-
I don't use WordPress, if you are willing to use Drupal 7 (not the latest one, I haven't worked on Drupal in a long time), here is the solution:
- Create pages for Monday, Wednesday, ...
- In settings.php, change $conf['site_frontpage'] to corresponding page for each day
I could install this on your host (for free)! Please let me know if you would like!
-
On 11/19/2022 at 4:07 PM, David Schwartz said:Here's some pseudo-code that needs to be executed when you visit a particular URL:
case TodaysName of 'mon': ShowPage(1); 'tue': ShowPage(2); . . . 'fri': ShowPage(5); end;
ShowPage loads a list of either HTML files or URLs, then sends that page out to the browser. I want to implement this in TMS WebCore, and the app sits at the URL in question.
I'm looking at a situation where the pages use a different template for each day. Someone will edit the template for each day eg, on Sunday) and save it; when the URL is viewed in the browser it will display that day's template as edited previously.
The users might create the pages using an HTML page / web editor, or maybe create them in, say, Wordpres, or any number of similar options.
Is it sufficient to load up the entire HTML file and send it out to the browser? Or will the header need to be doctored in some way?
I suppose I could also write an app that would let the user edit the pages and save their most relevant details somewhere.I know this isn't specific to WebCore, but may be a fairly common problem with many kinds of services.
You would like to do this on client site (at the browser) or server side? Both are easy to implement (not TMS WebCore). If you would like to see a working demo, like my comment and back in tomorrow, I will show you 🙂
- 1
-
As a web developer in 12 years, I’m sure no Javascript developer willing to learn Delphi. From their point of view, Delphi is dying programming language and the concept of two languages are different. Js eco (include NodeJs) has a lot of framework for both back-end and front-end, there is no reason for a Js dev using Delphi for the back-end! You could take a look at AdonisJs for an example!
And the Delphi dev also dont want to learn Js, it is a dynamic language and annoyed when using (it is why TypeScript was born).
If you would like to hire a Delphi dev who experienced with Js, please contact me! I’m willing to work 🙂
-
Artem's Classes/Components/Controls library (ACL)
Library contains number of classes, components and visual controls for Delphi that used in AIMP. I have published the library because it was used in plugins that no longer supported by me.
If anyone will be interested the library I will add more details and create index of all features and abilities of the library. My working Delphi is 11.0 Alexandria. The library may work on earlier versions of Delphi, but I haven't tested it.
- 2
-
Hi,
I have released source code of a small game. You could see the demo here: https://youtu.be/KVNRi83yYQA
Some screenshots:
Github repository: https://github.com/nglthach/Swim
Best!!
- 12
-
Hi,
I have ported SpkToolbar from Lazarus to Delphi. Here is the screenshot:
You could download here: https://github.com/nglthach/SpkToolbar4Delphi
OT: I'm looking for a remote Delphi developer position, if you would like to hire me, please contact via PM! Thanks!
- 5
-
-
You should take a look on AddExitProc: http://docwiki.embarcadero.com/Libraries/Sydney/en/System.SysUtils.AddExitProc
procedure DoOnExit; var s: string; begin s := ''; // Set a breakpoint here end; begin AddExitProc(DoOnExit); // Put this line before Application.Run Application.Initialize; Application.DefaultFont.Assign(Screen.MenuFont); Application.MainFormOnTaskbar := True; Application.CreateForm(TMainForm, MainForm); Application.Run; end;
Owner Drawing the Submenu Arrow
in VCL
Posted
The problem is VCL TCustomForm.WndProc call SaveDC before the owner drawing method, then restore the drawing context by calling RestoreDC
Solving the problem by overriding WndProc as: