Thread: Question relating to widgets.
-
December 31st, 2010, 13:45 #1
Question relating to widgets.
Is it possible to setup widgets so that you can type a character in it and have that character be usable?
For example. If I make a widget on a core stat, and wanted to manually type a modifier number into it, can we do that? Or does it have to be marked in the process of generating the widget?
Thanks for the help in advance!- Trying to find a community Ruleset, Extension or Information on how to complete a process? Try FGRepository.
- PM Myself if you have new or updated community Rulesets, Extensions or Information that you'd like added to FGRepository.
-
December 31st, 2010, 17:04 #2
Archangel
- Join Date
- Apr 2008
- Location
- Virginia Beach
- Posts
- 3,096
That could be done by overloading the intrinsic widget onClick at the very least. By looking at the code others have done to support 'zooming' a control to adjust its numeric value, you should be able to get a basic idea of how to go about it. I would be surprised if someone hasn't already written code to do exactly what you are proposing....
-
January 1st, 2011, 09:55 #3
There weren't very many posts detailing the use of Widgets which is, of course, why I was asking in the first place. I was hoping someone would have quick answer that prevent me from having to spend a lot of time researching and testing.
As to what I've found, unfortunately widgets are not like windowclasses. They don't have onClick functions and the like. They have a very limited scope of functionality and do not inherit any of the windowclass context because they are a widgetcontainer functions, not a windowinstance context.Last edited by drahkar; January 1st, 2011 at 10:00.
- Trying to find a community Ruleset, Extension or Information on how to complete a process? Try FGRepository.
- PM Myself if you have new or updated community Rulesets, Extensions or Information that you'd like added to FGRepository.
-
January 1st, 2011, 14:51 #4
Archangel
- Join Date
- Apr 2008
- Location
- Virginia Beach
- Posts
- 3,096
Sorry to have misled you. I think the only option is to handle the interface in the parent control. The d20_jpg character sheet makes extensive use of widgets (and I assume 4e, but I don't use that), so you might check there to see how Moon_wiz handled his interactions.
-
January 1st, 2011, 14:53 #5
I know on the systems in the past they involved a lot of dragging of numbers to the score to create the widget. I was just hoping to avoid that. What i might do is create some dialog code that I can use to create a entry field of some sort. I'll have to play with it and find out what it will accept.
- Trying to find a community Ruleset, Extension or Information on how to complete a process? Try FGRepository.
- PM Myself if you have new or updated community Rulesets, Extensions or Information that you'd like added to FGRepository.
Thread Information
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks