dbTalk Databases Forums  

Add button to Title bar

comp.databases.paradox comp.databases.paradox


Discuss Add button to Title bar in the comp.databases.paradox forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Jim Moseley
 
Posts: n/a

Default Add button to Title bar - 12-13-2006 , 10:31 AM







Greetings all.

I'm changing my app to let my users control if a form is a Dialog window
or not, and also where it should be placed on the desktop. We're starting
to use multiple monitors, so I don't want them to have to drag the window
to the other monitor every time it opens.

I can get the form to open correctly, but I don't have a way to turn off
the 'dialog mode' once it is opened, since the menu is not available. Also,
I can't capture the form's current position once it is a dialog for the same
reason.

Unless someone has a better idea, I think I need to add 2 buttons to the
title bar of these dialogs, left of the Minimize/Maximize/Close buttons:
Pin Window, and a checkbox for Dialog.

Does anyone know how to add buttons to the title bar in Paradox? I've found
some VB code, etc., but nothing in Opal!

These will be delivered forms, so I can't even add a new 'regular' button
on the fly.

Also, I don't want to put regular buttons on all forms and only show them
if it is a dialog. The blank space they take up when hidden won't look good.

Thanks,
Jim Moseley

(remove 'mapson' to send direct email)

Reply With Quote
  #2  
Old   
Anders Jonsson
 
Posts: n/a

Default Re: Add button to Title bar - 12-13-2006 , 12:19 PM






Quote:
I can get the form to open correctly, but I don't have a way to turn off
the 'dialog mode' once it is opened, since the menu is not available.
I don't think you can change the mode once it's opened. However you can use
openAsDialog when you open it.

Quote:
Also,
I can't capture the form's current position once it is a dialog for the
same
reason.
Why don't you set the postion when you open it, the open syntax let you add
position.

I'm not sure what exactly you want to do but if you wish the forms to open
in the same place as they were closed last time it shouldn't be that
difficult. You could add code that write the position information to a table
or an ini-file (maybe in PRIV) when the form closes. When the form open next
time it will check for the info and reposition itself.

I can't really see what the benefit would be to let the user have the option
to open a form as a dialog or not. I think that decision is mostly depending
on the programming situation. If I use a dialog I often have a reason for it
and wouldn't like the user to be able to change that.



Anders





Reply With Quote
  #3  
Old   
Jim Moseley
 
Posts: n/a

Default Re: Add button to Title bar - 12-13-2006 , 02:03 PM




Anders,

I like your idea of using the form's close() to save the position. I still
need some way to turn off the dialog mode (for the next time the window opens).


Does anyone have a way to put an extra button on the title bar? Or, can
a toolbar somehow be linked to a dialog form instead of just the Pdox desktop?
FYI, I use a screen capture utility (FullShot 7) that puts 6 extra buttons
on every open window. That's what I'm trying to duplicate. Any ideas?

With multiple monitors, the Paradox desktop should at most be only as large
as one of the monitors. I want to be able to let the user 'park' a form
on the other monitor, which I can only do by opening the form as a dialog
(otherwise it can't leave the Pdox desktop).

I've got the openAsDialog worked out, including using a preset position.
I just need a way to let them adjust the dialog once it is opened - without
access to a menu, or design-mode on a form (since they'll be delivered).

The users are constantly referring to some of the overview screens in my
application. Currently, they have to open them or window to them if already
open. I want to let them park them over to the side and leave them open
all the time. Any other windows they use would open in the regular Pdox
desktop.

Thanks,
Jim Moseley

Reply With Quote
  #4  
Old   
Robert Molyneux
 
Posts: n/a

Default Re: Add button to Title bar - 12-13-2006 , 02:43 PM



Just a question - if you use OpenAsDialog, doesn't that prevent any further
work until the form is closed?

"Jim Moseley" <jmose (AT) mapson (DOT) attglobal.net> wrote

Quote:
I've got the openAsDialog worked out, including using a preset position.
I just need a way to let them adjust the dialog once it is opened -
without
access to a menu, or design-mode on a form (since they'll be delivered).

The users are constantly referring to some of the overview screens in my
application. Currently, they have to open them or window to them if
already
open. I want to let them park them over to the side and leave them open
all the time. Any other windows they use would open in the regular Pdox
desktop.

Thanks,
Jim Moseley



Reply With Quote
  #5  
Old   
Jim Moseley
 
Posts: n/a

Default Re: Add button to Title bar - 12-13-2006 , 03:53 PM




Robert,

Quote:
if you use OpenAsDialog, doesn't that prevent any further
work until the form is closed?
No, since I don't set the Modal option. If I move the dialog off of the
Pdox desktop, I can do whatever I want in the desktop.

Thanks,
Jim Moseley



Reply With Quote
  #6  
Old   
Anders Jonsson
 
Posts: n/a

Default Re: Add button to Title bar - 12-13-2006 , 06:55 PM



Quote:
I like your idea of using the form's close() to save the position.
Put the code in action method of the form and trap for MenuCanClose, that
way it will trigger even if they close Paradox with an open form.


Quote:
I still
need some way to turn off the dialog mode (for the next time the window
opens).
Why? If your forms are designed as regular forms and then you use
OpenAsDialog if you wish it to open as a dialog. You can use the same
technique as with the size - store the user preference for a specific form
in a table and look it before you issue the open command. Maybe you can let
the user edit this in a "preferences" form??


Quote:
I just need a way to let them adjust the dialog once it is opened -
without
access to a menu, or design-mode on a form (since they'll be delivered).
I still think, that once you have the form open, you can't change it's
status as a regular form/dialog. You will have to close and reopen it with
the new status, but I could be wrong on this.

Anders




Reply With Quote
  #7  
Old   
Jim Moseley
 
Posts: n/a

Default Re: Add button to Title bar - 12-13-2006 , 08:17 PM




Anders,

Quote:
I still think, that once you have the form open, you can't change it's
status as a regular form/dialog. You will have to close and reopen it with

the new status, but I could be wrong on this.
I understand this. That's where my problem comes from.

The user can display a regular form, then choose a menu option that will
flag it a dialog. From then on, whenever they reopen this form, I use openAsDialog
instead. All good so far.

Once it is a dialog, I don't have a way for them to position it, though I
could use your technique of setting it on close.

But the main problem is that once it is a dialog, I have no way for them
to turn off the flag to switch it back to a regular form (the next time they
try to open it). This is the real stickler, since they don't have access
to the menu from the dialog. I've got to add some sort of control to the
dialog itself that will trigger my code to reset the switch.

Since it will be delivered code, I can't just add a uiObject to the form.
Also, I'd rather not have blank space on the form if it isn't a dialog.
So, that's what got me thinking about putting a button on the title bar.
I've seen other apps do it, but can't find any Opal code for it.

Make sense?

Thanks,
Jim Moseley


Reply With Quote
  #8  
Old   
Anders Jonsson
 
Posts: n/a

Default Re: Add button to Title bar - 12-14-2006 , 03:22 AM



Quote:
Since it will be delivered code, I can't just add a uiObject to the form.
Also, I'd rather not have blank space on the form if it isn't a dialog.
So, that's what got me thinking about putting a button on the title bar.
I've seen other apps do it, but can't find any Opal code for it.

Make sense?

OK, so what it basically comes down to is that you don't want to waste space
on the form.

Well, I have no clue about how to add a button to title bar.

I would be surprised if your form were so cramped that you couldn't fit a
small button or a checkbox to handle this, but it's ofcourse a matter of
preferences. How about a shortcut key that triggers the code? Ofcourse you
then have the problem of informing the user about it...

Anders




Reply With Quote
  #9  
Old   
Jim Moseley
 
Posts: n/a

Default Re: Add button to Title bar - 12-14-2006 , 02:40 PM




Anders,

It's not just one form. I'm letting my users control which of the 200 or
so forms in my application they want to open as a dialog.

Does anyone know how to add a button to the title bar?

Thanks,
Jim Moseley

Reply With Quote
  #10  
Old   
Rick Rans
 
Posts: n/a

Default Re: Add button to Title bar - 12-14-2006 , 03:45 PM



Can you use a menu item. Its possible to do that as I've seen it done by
ProView. If that works and you need informaiton on adding menu items, there
is stuff in the help and you can ask a specific queston here.

HTH - Rick

"Jim Moseley" <jmose (AT) mapson (DOT) attglobal.net> wrote

Quote:
Anders,

It's not just one form. I'm letting my users control which of the 200 or
so forms in my application they want to open as a dialog.

Does anyone know how to add a button to the title bar?

Thanks,
Jim Moseley



Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.