March 28, 2024, 12:05:30 PM

News:

Own IWBasic 2.x ? -----> Get your free upgrade to 3.x now.........


Custom Window - The real release V1

Started by Andy, January 03, 2018, 06:14:59 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Andy

January 03, 2018, 06:14:59 AM Last Edit: January 03, 2018, 07:06:38 AM by Andy
Here is the new custom window code.

You can create a window without a maxmise box, but with all the work I've put in to the menu items you might want this anyway.

I've fixed some major problems....

1. Tracking of menu items only relates to the showing menu title and it's items, previously all items were tracked and that was causing display problems.

2. Popups can have icons ans separators.

This has taken a long time to do, but it's nice as you can play around with the menu titles / items / popup styles / fonts.

I will document this over the weekend and provide a help file as an update.

If you like my custom window you should download this "Proper release 1" from here.

If you like the menu features but would also like a maximise box, just let me know.

P.S. Don't forget to copy the inc files to C:\IWBDev3\Include folder AND copy the lib files to C:\IWBDev3\libs

Happy new year every one!

Andy.
:)
Day after day, day after day, we struck nor breath nor motion, as idle as a painted ship upon a painted ocean.

Andy

January 13, 2018, 05:04:45 AM #1 Last Edit: January 13, 2018, 05:06:45 AM by Andy
I wanted a way to add in shortcuts for each menu / popup item but I could not get the alignment correct.

Then it dawned on me the best way to do this was to split each item up into segments, so I've split it into five extra controls per menu / popup item like this:

1. An indentation
2. An icon (if required)
3. The style of the item (checkbox / radio button / static)
4. The item's text
5. The shortcut text (if required).

But this gave me problems, and I realised all I needed to do was to first create a hidden control (the length of which would be the total of the above five) and simply track this single control for a mouse over event.

The five extra controls are placed over the hidden control.

When the mouse is over the hidden control, the corresponding five controls are highlighted.

This means each block of text is aligned and I think it looks good.

I have yet to do the popup items, but menu items and popup titles are now working well.

See attached.

Andy.
Day after day, day after day, we struck nor breath nor motion, as idle as a painted ship upon a painted ocean.