Forum > Packages and Libraries
TATTabs and Modified status
(1/1)
Mastropiero:
Hello,
I am dealing with status and saving of documents attached to TTabData objects but can't understand exactly how it works. I haven't found too much documentation either.
I have some questions:
* What is the difference between: TabModified, TabModified2, TabExtModified, TabExtModified2 ?
* Can the 'modified' symbol be placed or spaced properly? It always appears in the middle of the tab, above the caption. I've only been able to change the circle's size, but not its position.
* When I create a new tab, I set TabModified to True and it effectively draws the "modified" circle and changes the caption's colour as specified in the properties. However, after saving the document, I set TabModified to False but it remains the same ('modified' colour and symbol). What am I doing wrong?
* What's the proper way to use the 'modified' properties in conjuction with CanClose, CanContinue parameters on the OnTabClose event? Can anyone point to a good example of this?
Sorry for the bunch of questions but I can't find any docs or references to this on the forum.
Thank you for your help.
AlexTP:
--- Quote --->What is the difference between: TabModified, TabModified2, TabExtModified, TabExtModified2 ?
--- End quote ---
Simple app needs only TabModified - tab object is modified.
TabModified2 is for CudaText - paired editor (embedded with the main editor into the same tab) is modified.
TabExt* - are for CudaText - means 'file was modified from external program'.
--- Quote --->Can the 'modified' symbol be placed or spaced properly? It always appears in the middle of the tab, above the caption.
--- End quote ---
It cannot be changed yet. Noone wanted to change it (even users of CudaText).
--- Quote ---> after saving the document, I set TabModified to False but it remains the same
--- End quote ---
Can you give the small sample project to show this?
Maybe app did not call Invalidate after setting the prop.
--- Quote --->What's the proper way to use the 'modified' properties in conjuction with CanClose, CanContinue parameters
--- End quote ---
These are independent things. Not connected.
Mastropiero:
--- Quote from: AlexTP on March 17, 2025, 03:07:35 pm ---Simple app needs only TabModified - tab object is modified.
TabModified2 is for CudaText - paired editor (embedded with the main editor into the same tab) is modified.
TabExt* - are for CudaText - means 'file was modified from external program'.
--- End quote ---
Thank you! It makes sense now.
--- Quote --->
It cannot be changed yet. Noone wanted to change it (even users of CudaText).
--- End quote ---
Ok. Not a big deal. I can handle it manually if necessary.
--- Quote ---Can you give the small sample project to show this?
Maybe app did not call Invalidate after setting the prop.
--- End quote ---
Excellent, it was the missing Invalidate. It works perfectly now.
--- Quote --->What's the proper way to use the 'modified' properties in conjuction with CanClose, CanContinue parameters
These are independent things. Not connected.
--- End quote ---
Yup, I understand they're different things (although they're related from a functional point of view).
Still, are CanContinue and CanClose documented anywhere? I guess CanClose works the same as as FormClose, but I'm not sure about CanContinue.
Thank you for your help.
AlexTP:
I now added comment to the attabs.pas:
//ACanClose: handler must set to True to allow closing of the current tab.
//ACanContinue: handler must set to True to allow closing of other tabs, for the mass closing request, eg "Close all tabs".
Navigation
[0] Message Index