[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Three V questions

Dan Osborne wrote:
> Hello all,
> After spending some time getting to grips with V I now have an app that
> actually does something and thanks go to everyone who made this possible!
> There are a few tidying up bits I'd like to achieve, however.
> Firstly, what is the best way of having a modal dialog remember it's
> settings between calls? I have a textin and a radio button group.

It usually takes an exteral struct. For example, VIDE keeps most of the
global data in videApp. Then when the dialog gets opened (like in
VIDE options),
first you retrieve the current values from the global data structure and
set the appropriate dialog items in the DialogDisplayed method. Then
in the action routine for the dialog (the one that calls ShowDialog),
you take all the vaues from the dialog definition and set the global
data structure to the new values right after the call to
(accounting for Cancel, etc.).

> Also, is there a way to determine which field in a dialog gets initial
> focus? I have a dialog that operates in New and Edit mode. For New, the
> first field is to be entered and gets focus by default which is great but in
> Edit mode this field is disabled and I'd like focus to be on the second
> field.
Nope. A deficiency of V.

> And finally, does the latest V release relax the restriction on maximum
> length of c_lists? I'd like to populate them from database tables and there
> are very many with > 128 items. Currently I'm using a cut down texteditor
> canvas instead.

I don't think there is any limit. V uses the Windows WIN32 list control
and any limits would come from it, and not V. Same for the motif
> Thanks in anticipation
> Dan Osborne


Bruce E. Wampler, Ph.D.

Author of the V C++ GUI Framework

e-mail: mailto:bruce@objectcentral.com
web:    http://www.objectcentral.com

Reply to: